Community
Participate
Working Groups
Using test case of bug 126332, I put a breakpoint on AIOOBE and surprisingly stopped in CompilationUnitScope with following stack trace: CompilationUnitScope.findImport(char[][], int) line: 423 CompilationUnitScope.getImport(char[][], boolean, boolean) line: 548 DefaultBindingResolver.resolveName(Name) line: 1060 SimpleName(Name).resolveBinding() line: 86 SemanticToken.getBinding() line: 44 SemanticHighlightings$DeprecatedMemberHighlighting.getMethodBinding(SemanticToken) line: 1135 SemanticHighlightings$DeprecatedMemberHighlighting.consumes(SemanticToken) line: 1108 SemanticHighlightingReconciler$PositionCollector.visit(SimpleName) line: 120 SimpleName.accept0(ASTVisitor) line: 147 SimpleName(ASTNode).accept(ASTVisitor) line: 2466 ImportDeclaration(ASTNode).acceptChild(ASTVisitor, ASTNode) line: 2513 ImportDeclaration.accept0(ASTVisitor) line: 221 ImportDeclaration(ASTNode).accept(ASTVisitor) line: 2466 CompilationUnit(ASTNode).acceptChildren(ASTVisitor, ASTNode$NodeList) line: 2536 CompilationUnit.accept0(ASTVisitor) line: 211 CompilationUnit(ASTNode).accept(ASTVisitor) line: 2466 Looking at variables, it seems that compoundName parameter of CompilationUnitScope.getImport(char[][], boolean, boolean) was an unexpected empty array which raises this exception on "compoundName[0]" of CompilationUnitScope.findImport(char[][], int) Perhaps DefaultBindingResolver.resolveName should not call CompilationUnitScope.getImport method when index is == 0?
I will investigate.
Sorry I forgot to mention that I got this exception while editing V.java...
Could not reproduce.
I get it systematically using following scenario: 1) Create a launch config starting eclipse on a brand new workspace 2) Unzip project attached to bug 126332 at this workspace location 3) Import unzipped project in this workspace 4) Set compiler settings to 5.0 and add JRE 1.5.0 as default => you'll get no longer compiler error 5) Put a breakpoint on ArrayIndexOutOfBoundException and restrict it by excluding Scanner and PublicScanner 6) Expand project in Package Explorer and in test package double-click on V.java 7) Wait a few seconds and you should hit the breakpoint in debugger perspective...
Reproduced. Fixed and released in HEAD. Regression test in org.eclipse.jdt.core.tests.dom.ASTConverter15Test.test0209
Verified for 3.2 M5 using build I20060215-0010