Summary: | java.lang.StringIndexOutOfBoundsException when compiling (build no.: 20051220093604) | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Luca Zenti <luca.zenti> |
Component: | Compiler | Assignee: | Andrew Clement <aclement> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | luca.zenti |
Version: | 1.5.0 | ||
Target Milestone: | 1.5.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Luca Zenti
2006-01-02 12:16:49 EST
I tried to debug the aspectj weaver code and I found that the signature generating the error is: Pcom/lynxit/parsers/fixedwidth/FixedWidthParser$Column; It seems that the lack of '<' character is the problem. Investigating a little more I discovered that a inner class (even static) of a generic class inherits the type parameters, I don't know if this is in the Java language specs or an eclipse bug but this is surely the cause of the bug I submitted since extracting the inner class to a new type file I'm able to compile the project. Hope this helps. Many thanks in advance. Can I ask the ID of the AJDT build that is the problem? (Its somewhere in the eclipse about menus), something like 1.3.0.XXXXX. I fixed a problem similar to this near to completion of 1.5.0. The problem was that a generic signature was being put out for a type that included a 'P' prefixed type signature. 'P' signatures should never be included in the output bytecode, they are our AJ internal representation for a parameterized type, enabling us to quickly determine if something is parameterized without digging round for the '<'. The ajdt build number is: 1.3.0.20051220093604 Ok, thats 1.5.0 final - so there is something lurking here. but I just can't seem to tease it out and recreate it. My current attempts look something like: === import java.util.*; class A<T> { } class B<T> extends A<T> { static class C { T t;} class D extends C {} List<C> lcs; C[] csArray; } === but that works fine. Were you able to determine where the P signature originated from? Was it a signature attribute on some other type or declaration? Where/How is the Column member type used? If you could send me the "javap -verbose -private" output for the problem class that would help ... are you able to send it me privately if you can't append it here? I eventually succeded in producing a test case that can really isolate the problem: public class TestCase<T, V> { public void setInnerClasses(InnerClass[] classes){}; public static class InnerClass {} } Compiling this class alone (using ajdt) I get the error. aha... it was being used as a parameter, I see. Thanks for taking the time to create a smaller failing case. I can now recreate it on the command line with: ajc -1.5 Testcase.java -emacssym (-emaccsym is required to ensure that from the command line we drive the structure model building code that AJDT drives - and thats where it is failing) I'll get to work on a fix. I'm glad I helped you guys. My little contribute to your great job! testcases and fix checked in. fix is in latest AJ - will be in AJDT in a few days. |