Community
Participate
Working Groups
package p; class A{ int i(){ int[] a= new int[6]; int /**/i= a[9]; return i; } } when i ask for the declarationSourceStart and declarationSourceEnd of the i temp and the look a source in that range i get: /**/i= a[9] the type is not included. however, when you change the type declaration to: int i= a[9]; everything is fine, i.e. the source is: int i= a[9]
This bug is a side-effect of the bug in checkAnnotation() of the parser class. I guess I can fix it if I consider that a local variable is never concerned by javadoc comments preceeding the declaration. In your test case if you remove the comment, you will get the right positions.
Fix released in HEAD. Change in the Parse::checkAnnotation()