intern all class names

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@711 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 83047ecb43
commit 2768fceee4
  1. 6
      jode/jode/bytecode/ConstantPool.java

@ -197,7 +197,7 @@ public class ConstantPool {
String type = getUTF8(indices2[nameTypeIndex]); String type = getUTF8(indices2[nameTypeIndex]);
checkTypeSig(type, tags[i] != FIELDREF); checkTypeSig(type, tags[i] != FIELDREF);
String clName = getClassType(classIndex); String clName = getClassType(classIndex);
constants[i] = new Reference constants[i] = Reference.getReference
(clName, getUTF8(indices1[nameTypeIndex]), type); (clName, getUTF8(indices1[nameTypeIndex]), type);
} }
return (Reference) constants[i]; return (Reference) constants[i];
@ -228,7 +228,7 @@ public class ConstantPool {
checkTypeSig(clName, false); checkTypeSig(clName, false);
else { else {
checkClassName(clName); checkClassName(clName);
clName = "L"+clName+';'; clName = ("L"+clName+';').intern();
} }
return clName; return clName;
} }
@ -240,7 +240,7 @@ public class ConstantPool {
throw new ClassFormatException("Tag mismatch"); throw new ClassFormatException("Tag mismatch");
String clName = getUTF8(indices1[i]); String clName = getUTF8(indices1[i]);
checkClassName(clName); checkClassName(clName);
return clName.replace('/','.'); return clName.replace('/','.').intern();
} }
public String toString(int i) { public String toString(int i) {

Loading…
Cancel
Save