#81 jode-1.1.2-pre1 - NPE in SyntheticAnalyzer.checkAccess

open
nobody
None
5
2014-10-21
2005-09-10
No

When decompiling a class file - i get the following
exception:

java.lang.NullPointerException
at jode.jvm.SyntheticAnalyzer.checkAccess
(SyntheticAnalyzer.java:234)
at jode.jvm.SyntheticAnalyzer.<init>
(SyntheticAnalyzer.java:73)
at jode.decompiler.MethodAnalyzer.<init>
(MethodAnalyzer.java:220)
at jode.decompiler.ClassAnalyzer.initialize
(ClassAnalyzer.java:267)
at
jode.decompiler.ClassAnalyzer.dumpJavaFile
(ClassAnalyzer.java:661)

changing the line:

FieldInfo refField
= refClazz.findField(ref.getName(),
ref.getType());
if ((refField.getModifiers() & modifierMask) !
= 0)

to have a null pointer guard fixed it for me....

FieldInfo refField
= refClazz.findField(ref.getName(),
ref.getType());
if ( refField != null && (refField.getModifiers
() & modifierMask) != 0)

Discussion