Community
Participate
Working Groups
I was editing code in org.eclipse.jdt.internal.core.builder.ReferenceCollection and somehow while hovering over some code I've got this error below reported in the log. The error itself is not a point in this bug (it is coming from bug 545605). What really surprises me, the error mentions the "broken" type I have in absolutely unrelated Java project "A", which is NOT on JDT bundle classpath, and which contains the class from bug 545605 inside the "lib" class folder in same project. Why on earth JavaSourceHover.getHoverInfo asks for absolutely unrelated type on absolutely unrelated project? eclipse.buildId=4.12.0.I20190401-1800 java.version=11.0.2 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86_64 org.eclipse.jface.text Error Tue Apr 02 15:00:11 CEST 2019 Unexpected runtime error while computing a text hover java.lang.IllegalStateException: Mismatching number of parameter annotations, 2>1 in a(Ljava/util/function/Function;Ljava/lang/Object;J)Z in /A/lib/e.class at org.eclipse.jdt.internal.compiler.classfmt.MethodInfoWithParameterAnnotations.getParameterAnnotations(MethodInfoWithParameterAnnotations.java:46) at org.eclipse.jdt.internal.core.ClassFileInfo.generateMethodInfos(ClassFileInfo.java:364) at org.eclipse.jdt.internal.core.ClassFileInfo.readBinaryChildren(ClassFileInfo.java:432) at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:91) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:268) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312) at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:298) at org.eclipse.jdt.internal.core.AbstractClassFile.getBuffer(AbstractClassFile.java:221) at org.eclipse.jdt.internal.core.SourceRefElement.getSource(SourceRefElement.java:212) at org.eclipse.jdt.internal.ui.text.java.hover.JavaSourceHover.getHoverInfo(JavaSourceHover.java:149) at org.eclipse.jdt.internal.ui.text.java.hover.JavaSourceHover.getHoverInfo2(JavaSourceHover.java:120) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:167) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:133) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:89) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:169) Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2 at org.eclipse.jdt.internal.compiler.classfmt.MethodInfoWithParameterAnnotations.getParameterAnnotations(MethodInfoWithParameterAnnotations.java:30) ... 16 more
Can you provided detailed steps?
(In reply to Dani Megert from comment #1) > Can you provided detailed steps? No, only stack. I guess this must be a design issue of hover, the type or method shouldn't ever be found in scope of the current editor/project, *if* the type/method search was scoped at all, and not just "all the workspace search".
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.