final static fields must always be initialized, so output a null

initializer, if none was found before.


git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1241 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 25 years ago
parent 826a7ec101
commit 076911a762
  1. 5
      jode/jode/decompiler/FieldAnalyzer.java.in

@ -187,6 +187,11 @@ public class FieldAnalyzer implements Analyzer {
writer.breakOp(); writer.breakOp();
writer.print(" = "); writer.print(" = ");
constant.dumpExpression(writer.IMPL_PAREN, writer); constant.dumpExpression(writer.IMPL_PAREN, writer);
} else if ((modifiers & (Modifier.STATIC | Modifier.FINAL))
== (Modifier.STATIC | Modifier.FINAL)) {
/* Static final fields must always be initialized */
writer.breakOp();
writer.print(" = null");
} }
writer.endOp(); writer.endOp();
writer.println(";"); writer.println(";");

Loading…
Cancel
Save