Community
Participate
Working Groups
Using 0227, the following test case generated: A.class A$1.class A$3.class A$2.class is not generated. public class A { public static void main(String[] args) { Object o = new Object() {}; if (true) { System.out.println("Always true"); } else { System.out.println(new Object() {}); } System.out.println("last inner class = " + new Object() {}); } } javac 1.4.1 behaves the same. jikes 1.18 generates all of them even if the anonymous in the false clause of the if(true) is never used. Ideally we want to have: A.class A$1.class (this would correspond to the first anonymous class in the code) A$2.class (this would correspond to the third anonymous class in the code)
This is for post 2.1.
reopen
Inner emulation was incorrectly performed in fake reachable code.
Fixed in latest, also avoid doing any emulation in fake reachable code.
Verified.