eclipse-jdt / eclipse-jdt/eclipse.jdt.core
ArrayIndexOutOfBoundsException for Ctrl+Shift+G find references
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
First of all congratulations for moving to a modern bug reporting system! 🎉 If this is the wrong subproject to report this bug, please direct me to the right one.
eclipse.buildId=4.23.0.I20220308-0310
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
I recently upgraded to Eclipse 4.23 on Windows 10 by unzipping `eclipse-jee-2022-03-R-win32-x86_64.zip` and using my existing workspace which I've been using for literally decades with Eclipse. I immediately ran into all sorts of odd bugs, especially with Maven-related things.
But here's a bug that appeared when I just pressed `Ctrl+Shift+G` to find references to a class. Here is the error with stack trace:
> An internal error occurred during: "Java Search".
```
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:133)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:522)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:634)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:630)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveSuperType(TypeReference.java:602)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.findSupertype(ClassScope.java:1670)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectSuperclass(ClassScope.java:1176)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy(ClassScope.java:1454)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:367)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings(LookupEnvironment.java:586)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.accept(MatchLocator.java:381)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:334)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:276)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3466)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3173)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:522)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:625)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:621)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:2870)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:2705)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:2276)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:1518)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:1113)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:533)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:2021)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1353)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1390)
at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1509)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:135)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:251)
at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:602)
at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:670)
at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:178)
at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:94)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
```
I likely cannot provide further details for reproducing this bug; hopefully the stack track will give you an idea of what went wrong.
(This was originally filed as https://github.com/eclipse-platform/eclipse.platform/issues/24 .)
Contributor guide
Assessment
This issue has not been assessed yet.