From 6eb7f2d1bbf2a0bc08c82e629575b4a4935a72d0 Mon Sep 17 00:00:00 2001 From: Florian Steurer Date: Fri, 22 Apr 2016 10:24:33 +0200 Subject: [PATCH] removed creation of new strings --- .../typeinference/unify/model/ReferenceType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java b/src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java index e82affe0..02ab38a0 100644 --- a/src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java +++ b/src/de/dhbwstuttgart/typeinference/unify/model/ReferenceType.java @@ -43,14 +43,14 @@ public final class ReferenceType extends UnifyType { if(newParams.hashCode() == typeParams.hashCode() && newParams.equals(typeParams)) return this; - return new ReferenceType(new String(typeName), newParams); + return new ReferenceType(typeName, newParams); } @Override public UnifyType setTypeParams(TypeParams newTp) { if(newTp.hashCode() == typeParams.hashCode() && newTp.equals(typeParams)) return this; // reduced the amount of objects created - return new ReferenceType(new String(typeName), newTp); + return new ReferenceType(typeName, newTp); } @Override