Community
Participate
Working Groups
/* * This class compiles and runs using JDK 1.3.1 and JDK 1.4 from the command line * In Eclipse Build 20020125 get VerifyError at runtime: * * java.lang.VerifyError: (class: VE_Test, method: test signature: ()V) * Must call initializers using invokespecial * Exception in thread "main" * */ public class VE_Test { class VE_Inner { private VE_Inner() { } } private static void test() { VE_Test ve_test = new VE_Test(); VE_Inner pi = ve_test.new VE_Inner(); } public static void main(String[] args) { new VE_Test(); System.out.println("Hello world"); } }
Excellent find, thanks for the test case. We did indeed misgenerate code for such qualified allocations (Note that if you had been in a context where no enclosing instance had been necessary for allocation the innerclass, we would have produced correct bytecodes). Regression test added, test will be released into next integration build (after milestone-3 unfortunately).