Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314884

Summary: [content assist] IllegalArgumentException with function return type of "boolean" rather than "Boolean"
Product: [WebTools] JSDT Reporter: Chris Jaun <cmjaun>
Component: GeneralAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: jacek.pospychala
Version: 3.2Flags: thatnitind: review+
Target Milestone: 3.2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch - uses the changePrimitiveToObject() method. none

Description Chris Jaun CLA 2010-05-28 10:41:45 EDT
/**
 * 
 * @returns {boolean}
 */
function fun1(a) {
	return a;
}

var a = fu*

Attempt content assist at the *.

If you change the return type to "Boolean" it works fine.


java.lang.IllegalArgumentException
	at org.eclipse.wst.jsdt.internal.core.util.Util.scanTypeSignature(Util.java:2240)
	at org.eclipse.wst.jsdt.core.Signature.getReturnType(Signature.java:813)
	at org.eclipse.wst.jsdt.ui.text.java.CompletionProposalLabelProvider.createMethodProposalLabel(CompletionProposalLabelProvider.java:246)
	at org.eclipse.wst.jsdt.ui.text.java.CompletionProposalLabelProvider.createLabel(CompletionProposalLabelProvider.java:529)
	at org.eclipse.wst.jsdt.internal.ui.text.java.LazyJavaCompletionProposal.computeDisplayString(LazyJavaCompletionProposal.java:222)
	at org.eclipse.wst.jsdt.internal.ui.text.java.LazyJavaCompletionProposal.getDisplayString(LazyJavaCompletionProposal.java:212)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.handleSetData(CompletionProposalPopup.java:833)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$24(CompletionProposalPopup.java:819)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$3.handleEvent(CompletionProposalPopup.java:583)
Comment 1 Chris Jaun CLA 2010-06-09 18:30:23 EDT
Created attachment 171587 [details]
patch - uses the changePrimitiveToObject() method.
Comment 2 Chris Jaun CLA 2010-06-29 09:32:21 EDT
Patch checked in.