Community
Participate
Working Groups
Build Identifier: I20110310-1119 If a class file in jar is an inner Java type with constructor that has annotated parameters, ArrayIndexOutOfBoundsException is thrown when IType is accessed, for instance when user tries to open that element of jar in Class File Editor. Reproducible: Always Steps to Reproduce: 1. Create a Java project with one java source package test; public class A { class B { public B(@Deprecated String s) { } } } . 2. Build that project and export it into a.jar file. 3. Create another Java project and add a.jar file as an external jar. 4. Expand Referenced Libraries -> a.jar -> test -> A.class and try to open it in Class File Editor. 5. Error logged with ArrayIndexOutOfBoundsException
Created attachment 193190 [details] ArrayIndexOutOfBoundsException
Created attachment 193211 [details] Proposed fix + regression test
This patch is not good as it uses the Signature class inside compiler code. Will try to find another way to get the parameter count.
Created attachment 193263 [details] Proposed fix + regression test I moved the signature scanning code in the Util class of the compiler. I left one method inside the model Util class as it is used inside the jdt.debug code.
Released for 3.7M7.
Verified for 3.7M7 using build I20110421-1800
*** Bug 343947 has been marked as a duplicate of this bug. ***