Summary: | Branch target offset too large for short | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Torsten Lull <Torsten.Lull> |
Component: | Compiler | Assignee: | Adrian Colyer <adrian.colyer> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | CC: | jim-aj |
Version: | 1.2 | ||
Target Milestone: | 1.2.1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Torsten Lull
2004-07-16 04:55:25 EDT
*** Bug 38168 has been marked as a duplicate of this bug. *** There is no restriction on the number of files that AspectJ can handle, but there is a Java restriction of the maximum length of a method (see section 4.10 of the JLS). With so many 'target' statements, AspectJ has to generate a method containing a very large 'if' test. This exceeds the maximum method length supported by the JVM. The fix will be to detect this situation and put out an error message akin to the one created if a 'regular' method exceeds this limit, rather than have the compiler crash with a Bcel exception. With the fix in place the compiler output will now be (from my test case): /home/colyer/workspaces/aspectjdev/tests/bugs/VeryLongBranch.java [error] problem generating method B.foo : Branch target offset too large for short (no source information available) 1 error Not the most informative message in the world, but accurate at least (and doing any better would require parsing of the string message text produced by BCEL exceptions and I really don't want to go there.) Fix now available in latest development jar from AspectJ download page. Fix released as part of AspectJ 1.2.1 |