Bug 578276 - Exception on text hover
Summary: Exception on text hover
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.23   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact: Jay Arthanareeswaran CLA
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-19 04:53 EST by Kenneth Styrberg CLA
Modified: 2024-01-12 14:07 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Styrberg CLA 2022-01-19 04:53:43 EST
Eclipse 2022-03M1, Java-11, Windows 10

Following snippet causes exception

package p;
import java.util.List;
public class E {
    void foo() {
        List.of().stream()
                .map(d -> {
                    return new I() {
                    };
                })
                .map(i -> null); // <<<< hover over 'i'
    }

    interface I {}
}



java.lang.IllegalArgumentException: new p.E.I(){}
	at org.eclipse.jdt.core.Signature.createCharArrayTypeSignature(Signature.java:1097)
	at org.eclipse.jdt.core.Signature.createTypeSignature(Signature.java:1293)
	at org.eclipse.jdt.internal.core.SelectionRequestor.acceptLocalVariable(SelectionRequestor.java:488)
	at org.eclipse.jdt.internal.codeassist.SelectionEngine.selectFrom(SelectionEngine.java:1410)
	at org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:1099)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:167)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:389)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:382)
	at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getJavaElementsAt(AbstractJavaEditorTextHover.java:121)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:662)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:658)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:130)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:89)
	at org.eclipse.jface.text.TextViewerHoverManager$1.run(TextViewerHoverManager.java:155)
Comment 1 Jay Arthanareeswaran CLA 2022-01-20 23:43:01 EST
Reproduced on latest master.
Comment 2 Jay Arthanareeswaran CLA 2022-01-20 23:52:21 EST
Actually, I can see it even with 4.22 and 4.21.

Gayan, is this something you can work on?
Comment 3 Gayan Perera CLA 2022-01-21 01:26:04 EST
@Jay sure i can look at it next week.
Comment 4 Eclipse Genie CLA 2024-01-12 14:07:07 EST
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.