Check for NullPointer in SyntheticAnalyzer. Based on

patch suggessted by Peter Klauser (klp at users.sf.net).


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1392 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 19 years ago
parent 90aa079d11
commit 190eefee2c
  1. 9
      jode/ChangeLog
  2. 12
      jode/jode/jvm/SyntheticAnalyzer.java.in

@ -1,3 +1,12 @@
2005-09-13 Jochen Hoenicke <jochen@gnu.org>
Check for NullPointer in SyntheticAnalyzer. Based on
patch suggessted by Peter Klauser (klp at users.sf.net).
* jode/jvm/SyntheticAnalyzer.java.in:
(checkStaticAccess): Check refField for null pointer.
(checkAccess): Likewise.
2005-09-13 Jochen Hoenicke <jochen@gnu.org> 2005-09-13 Jochen Hoenicke <jochen@gnu.org>
Added patch from Peter Klauser (klp at users.sf.net), to support Added patch from Peter Klauser (klp at users.sf.net), to support

@ -163,7 +163,8 @@ public class SyntheticAnalyzer implements Opcodes {
return false; return false;
FieldInfo refField FieldInfo refField
= refClazz.findField(ref.getName(), ref.getType()); = refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != Modifier.STATIC) if (refField == null
|| (refField.getModifiers() & modifierMask) != Modifier.STATIC)
return false; return false;
instr = (Instruction) iter.next(); instr = (Instruction) iter.next();
while (instr.getOpcode() == opc_nop && iter.hasNext()) while (instr.getOpcode() == opc_nop && iter.hasNext())
@ -208,7 +209,8 @@ public class SyntheticAnalyzer implements Opcodes {
return false; return false;
FieldInfo refField FieldInfo refField
= refClazz.findField(ref.getName(), ref.getType()); = refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != Modifier.STATIC) if (refField == null
|| (refField.getModifiers() & modifierMask) != Modifier.STATIC)
return false; return false;
instr = (Instruction) iter.next(); instr = (Instruction) iter.next();
while (instr.getOpcode() == opc_nop && iter.hasNext()) while (instr.getOpcode() == opc_nop && iter.hasNext())
@ -287,7 +289,8 @@ public class SyntheticAnalyzer implements Opcodes {
return false; return false;
FieldInfo refField FieldInfo refField
= refClazz.findField(ref.getName(), ref.getType()); = refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != 0) if (refField == null
|| (refField.getModifiers() & modifierMask) != 0)
return false; return false;
instr = (Instruction) iter.next(); instr = (Instruction) iter.next();
while (instr.getOpcode() == opc_nop && iter.hasNext()) while (instr.getOpcode() == opc_nop && iter.hasNext())
@ -332,7 +335,8 @@ public class SyntheticAnalyzer implements Opcodes {
return false; return false;
FieldInfo refField FieldInfo refField
= refClazz.findField(ref.getName(), ref.getType()); = refClazz.findField(ref.getName(), ref.getType());
if ((refField.getModifiers() & modifierMask) != 0) if (refField == null
|| (refField.getModifiers() & modifierMask) != 0)
return false; return false;
instr = (Instruction) iter.next(); instr = (Instruction) iter.next();

Loading…
Cancel
Save