simpler use of ConstOperator

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@449 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 1d77b7ad18
commit dd129994ff
  1. 7
      jode/jode/decompiler/FieldAnalyzer.java

@ -59,12 +59,7 @@ public class FieldAnalyzer implements Analyzer {
+ " has wrong length");
int index = (contents[0] & 0xff) << 8 | (contents[1] & 0xff);
ConstantPool cpool = cla.getConstantPool();
if (cpool.getConstantType(index).equals(Type.tInt))
constant = new ConstOperator(cpool.getConstantInt(index));
else
constant = new ConstOperator
(cpool.getConstantType(index),
cpool.getConstantString(index));
constant = new ConstOperator(cpool.getConstant(index));
constant.setType(type);
constant.makeInitializer();
} catch (ClassFormatException ex) {

Loading…
Cancel
Save