You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finding references of Foo causes ArrayIndexOutOfBoundsException:
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 12
at jdk.compiler/com.sun.tools.javac.util.Position$LineTabMapImpl.getColumnNumber(Position.java:266)
at jdk.compiler/com.sun.tools.javac.util.Position$LineMapImpl.getColumnNumber(Position.java:236)
at jdk.compiler/com.sun.tools.javac.util.Position$LineTabMapImpl.getColumnNumber(Position.java:253)
at org.javacs.FindHelper.location(FindHelper.java:146)
at org.javacs.FindHelper.location(FindHelper.java:133)
at org.javacs.navigation.ReferenceProvider.findReferences(ReferenceProvider.java:78)
at org.javacs.navigation.ReferenceProvider.find(ReferenceProvider.java:32)
at org.javacs.JavaLanguageServer.findReferences(JavaLanguageServer.java:320)
at org.javacs.FindReferencesTest.items(FindReferencesTest.java:21)
at org.javacs.FindReferencesTest.varTypeReferences(FindReferencesTest.java:62)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169)
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581)
The text was updated successfully, but these errors were encountered:
nya3jp
added a commit
to nya3jp/java-language-server
that referenced
this issue
Dec 15, 2024
It is possible that the matching type does not appear directly in the
AST, e.g. when a type is referenced with "var". This patch fixes the
issue by skipping such matches.
Fixesgeorgewfraser#297.
It is possible that the matching type does not appear directly in the
AST, e.g. when a type is referenced with "var". This patch fixes the
issue by skipping such matches.
Fixesgeorgewfraser#297.
Finding references of types occasionally causes
ArrayIndexOutOfBoundsException
. This is a small repro case:Finding references of
Foo
causesArrayIndexOutOfBoundsException
:The text was updated successfully, but these errors were encountered: