Closed ysangkok closed 11 years ago
Original code:
class Test { Test() { this(new Object()); } Test(Object i) { } }
Decompiled:
class Test { Test() { Object a = new Object(); this(a); } Test(Object a) { super(); } }
Trying to compile:
% javac Test.java Test.java:5: error: call to this must be first statement in constructor this(a); ^ 1 error
This is a known issue. Unfortunately, the limitations of Java mean that some patterns of bytecode can't reasonably be decompiled into valid Java. In these cases Krakatau will resort to pseduocode.
Original code:
Decompiled:
Trying to compile: