set innername to null, if empty string

an anonymous class (name == null) is no inner class, even if it has an
outer class


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@838 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 154f8dfd58
commit 4ca7f83209
  1. 5
      jode/jode/bytecode/ClassInfo.java

@ -175,10 +175,13 @@ public class ClassInfo extends BinaryInfo {
String innername = String innername =
nameIndex != 0 ? cp.getUTF8(nameIndex) : null; nameIndex != 0 ? cp.getUTF8(nameIndex) : null;
int access = input.readUnsignedShort(); int access = input.readUnsignedShort();
if (innername != null && innername.length() == 0)
innername = null;
InnerClassInfo ici = new InnerClassInfo InnerClassInfo ici = new InnerClassInfo
(inner, outer, innername, access); (inner, outer, innername, access);
if (outer != null && outer.equals(getName())) if (outer != null && outer.equals(getName())
&& innername != null)
innerClassInfo[innerCount++] = ici; innerClassInfo[innerCount++] = ici;
else else
innerClassInfo[count - (++extraCount)] = ici; innerClassInfo[count - (++extraCount)] = ici;

Loading…
Cancel
Save