Bug 87513 - NPE trying to get the generic signature of an unresolved method binding
Summary: NPE trying to get the generic signature of an unresolved method binding
Status: RESOLVED DUPLICATE of bug 97902
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 87516 89528 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-09 11:08 EST by Olivier Thomann CLA
Modified: 2005-06-03 09:53 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2005-03-09 11:08:54 EST
Using latest, I got the following error:

Exception in thread "Text Viewer Hover Presenter" java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.lookup.MethodBinding.genericSignature(MethodBinding.java:339)
	at
org.eclipse.jdt.internal.compiler.lookup.MethodBinding.computeUniqueKey(MethodBinding.java:293)
	at
org.eclipse.jdt.internal.compiler.lookup.MethodBinding.computeUniqueKey(MethodBinding.java:282)
	at
org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding.computeUniqueKey(TypeVariableBinding.java:177)
	at
org.eclipse.jdt.internal.compiler.lookup.WildcardBinding.computeUniqueKey(WildcardBinding.java:267)
	at
org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.computeUniqueKey(ParameterizedTypeBinding.java:139)
	at
org.eclipse.jdt.internal.codeassist.SelectionEngine.selectFrom(SelectionEngine.java:859)
	at
org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:731)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:140)
	at org.eclipse.jdt.internal.core.ClassFile.codeSelect(ClassFile.java:152)
	at org.eclipse.jdt.internal.core.ClassFile.codeSelect(ClassFile.java:141)
	at
org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getHoverInfo(AbstractJavaEditorTextHover.java:108)
	at
org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo(BestMatchHover.java:102)
	at
org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo(JavaEditorTextHoverProxy.java:69)
	at
org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:160)


Steps to reproduce:
1) Start an empty workspace.  Don't change the default options.
2) Set the JDK to be a 1.5.0 JDK
3) Create a java project that is using this JDK
4) Open type java.util.Collections.
5) Go to the method:
    public static <T> T min(Collection<? extends T> coll, Comparator<? super T>
comp) {

And put the mouse on top of Comparator. You should get the stack trace.
Debugging the code it seems that the method binding is not resolved yet.

The problem seems to be in the code assist SelectionEngine class.
Comment 1 Olivier Thomann CLA 2005-03-09 12:03:20 EST
*** Bug 87516 has been marked as a duplicate of this bug. ***
Comment 2 Olivier Thomann CLA 2005-03-30 09:29:02 EST
*** Bug 89528 has been marked as a duplicate of this bug. ***
Comment 3 Philipe Mulet CLA 2005-06-03 09:37:30 EDT
Jerome - is this still happening in latest?
Comment 4 Jerome Lanneluc CLA 2005-06-03 09:53:41 EDT
Verified this is fixed in HEAD.

*** This bug has been marked as a duplicate of 97902 ***