Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314884 - [content assist] IllegalArgumentException with function return type of "boolean" rather than "Boolean"
Summary: [content assist] IllegalArgumentException with function return type of "boole...
Status: RESOLVED FIXED
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.1   Edit
Assignee: Chris Jaun CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-28 10:41 EDT by Chris Jaun CLA
Modified: 2010-06-29 09:32 EDT (History)
1 user (show)

See Also:
thatnitind: review+


Attachments
patch - uses the changePrimitiveToObject() method. (965 bytes, patch)
2010-06-09 18:30 EDT, Chris Jaun CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.