Community
Participate
Working Groups
When running some classes compiled with Sun JDK 1.4 in mode -source 1.4 I get following error: java.lang.VerifyError: (class: Test, method: method1 signature: ()V) Expecting to find integer on stack The methods with assertions are not even called! Steps to reproduce: 1) Create following class: public class Test { private void method1() { try { invoke(); } catch (Throwable throwable) { assert false : throwable; } } private void invoke() {} public static void main(String[] args) {} } 2) compile it with ajc: ajc -source 1.4 Test.java 3) run the resulting class: java Test What should happen: The class should successfully execute. What really happens: The class fails with following output: ********************************** java Test java.lang.VerifyError: (class: Test, method: method1 signature: ()V) Expecting to find integer on stack Exception in thread "main" ********************************** Additional comments: The bug is reproducable in both - 1.2 and development download (as on today). I use j2sdk1.4.2_03. Please let me know if you need additional information. Regards, Andriy Palamarchuk
Since this is a pure java program, I was curious to see what the Eclipse java compiler made of it, in the 3.0 M6 milestone release (the version of their compiler inside AspectJ 1.2). Sure enough... java.lang.VerifyError: (class: Test, method: method1 signature: ()V) Expecting to find integer on stack Exception in thread "main" The program compiles happily under Eclipse 3.0 final, so this bug should be fixed as I upgrade the compiler level inside AspectJ.
Just completed the compiler upgrade, and the bug is now resolved. Will close this report once the fix is available in a published build.
Fix now available in latest build from AspectJ download page.
Fix released as part of AspectJ 1.2.1