Browse Source

ASM-generated class names get interned for better memory allocation

Issue: SPR-14862
pull/1257/head
Juergen Hoeller 9 years ago
parent
commit
d859826be6
  1. 4
      spring-core/src/main/java/org/springframework/asm/Type.java

4
spring-core/src/main/java/org/springframework/asm/Type.java

@ -562,7 +562,7 @@ public class Type { @@ -562,7 +562,7 @@ public class Type {
}
return sb.toString();
case OBJECT:
return new String(buf, off, len).replace('/', '.');
return new String(buf, off, len).replace('/', '.').intern();
default:
return null;
}
@ -577,7 +577,7 @@ public class Type { @@ -577,7 +577,7 @@ public class Type {
* @return the internal name of the class corresponding to this object type.
*/
public String getInternalName() {
return new String(buf, off, len);
return new String(buf, off, len).intern();
}
/**

Loading…
Cancel
Save