Summary: | IllegalArgumentException in Signature.getParameterCount | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tom Hofmann <eclipse> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | Olivier_Thomann | ||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 M5 | ||||||
Hardware: | PC | ||||||
OS: | Linux-GTK | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Tom Hofmann
2005-01-21 06:39:01 EST
oops, bugzilla hit me again. The stacktrace is not important for you (except the first three lines). Created attachment 17367 [details]
org.eclipse.jdt.internal.core.util.Util.diff
This may be completely off the real fix - but that's how I got it to work for
my purpose.
Where did you find out that foo(+Ljava.lang.Comparable;) is a valid signature? As far as I can tell, this is invalid. You need at least an identifier and some '<' and '>'. For example, this signature is ok foo(LA<+Ljava.lang.Comparable;>;). > Where did you find out that foo(+Ljava.lang.Comparable;) is a valid signature? I don't know really. I might just be mistaken. What I did: In my CompletionRequestor, I get a CompletionProposal of type METHOD_REF and use its signature to get the parameter types. For that, I pass them to Signature.getParameter{Count,Types}. The method signature contained in the proposal is in one case (+Ljava.lang.Comparable;). So, the problem might be with the proposal, and not Signature... I really don't know. > As far as I can tell, this is invalid. You need at least an identifier and > some '<' and '>'. For example, this signature is ok > foo(LA<+Ljava.lang.Comparable;>;). I guess the problem lies with the signatures received in CompletionRequestor. I filed bug 83600 to track this - feel free to close this one as a dup / mistaken. Olivier - such nasty signatures are non legal from sources, but may appear during substitutions, and revealed by some #getKey() APIs. Signature should thus support decoding them ok. Fixed and released in HEAD. Regression test added in SignatureTest. Verified in I20050215-2300 |