.class field: handle array$ names

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@973 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 4ef621b87a
commit 714e02cb6a
  1. 19
      jode/jode/decompiler/FieldAnalyzer.java

@ -112,10 +112,21 @@ public class FieldAnalyzer implements Analyzer {
public boolean setClassConstant(String clazzName) { public boolean setClassConstant(String clazzName) {
if (constant != null) if (constant != null)
return false; return false;
if (fieldName.equals("class$" + clazzName.replace('.', '$')) if (clazzName.charAt(0) == '[') {
|| fieldName.equals("class$L" + clazzName.replace('.', '$'))) { if (clazzName.charAt(clazzName.length()-1) == ';')
analyzedSynthetic(); clazzName = clazzName.substring(0, clazzName.length()-1);
return true;
if (fieldName.equals("array"+ (clazzName.replace('[', '$')
.replace('.', '$')))) {
analyzedSynthetic();
return true;
}
} else {
if (fieldName.equals("class$" + clazzName.replace('.', '$'))
|| fieldName.equals("class$L" + clazzName.replace('.', '$'))) {
analyzedSynthetic();
return true;
}
} }
return false; return false;
} }

Loading…
Cancel
Save