removed creation of new strings
This commit is contained in:
parent
7b6b720b57
commit
6eb7f2d1bb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user