Summary: | IllegalArgumentException in Signature | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kent Johnson <kent_johnson> | ||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||
Status: | CLOSED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | dirk_baeumer, philippe_mulet | ||||||
Version: | 3.1 | ||||||||
Target Milestone: | 3.1 RC2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Kent Johnson
2005-05-26 15:36:41 EDT
This is suspicious. The binding key is: Lp/X~Test<TT;TB;>; And the corresponding signature ends up being: <T:>Lp.X~Test; The label seems wrong. We end up with Test<T> instead of the expecting Test<T, B>. This leads to a wrong label when hovering on Test in "T extends Test<T, B>". For Key in "B extends Key<T, B>", the binding key is: Lp/X~Key<Lp/X~Test;:TT;Lp/X~Test;:TB;>; And then the label is as expected: Key<T, B>. Moving to JDT/UI to investigate if KeyToSignature is working as expected. Philippe, I put you in CC, because the binding for Test<T, B> is seen as a generic type and the binding for Key<T, B> is seend as a parameterized type. This doesn't look consistent. Olivier, I actually don't understand your question. The code on JDT/UI side looks as follows: if (getFlag(flags, T_TYPE_PARAMETERS)) { if (getFlag(flags, USE_RESOLVED) && type.isResolved()) { BindingKey key= new BindingKey(type.getKey()); if (key.isParameterizedType()) { String[] typeArguments= key.getTypeArguments(); getTypeArgumentSignaturesLabel(typeArguments, flags, buf); } else { String[] typeParameters= Signature.getTypeParameters(key.internalToSignature()); getTypeParameterSignaturesLabel(typeParameters, flags, buf); } } else if (type.exists()) { ... } } KeyToSignature is an internal JDT/Core class. However what we expect is that BindingKey#getTypeArguments (which uses KeyToSignature) returns an array of type signatures for parameterized types. Moving back to JDT/Core. Indeed, problem is on our side. Thanks Dirk. Created attachment 21932 [details]
Proposed fix
Created attachment 21933 [details]
Regression test
+1 for RC2 Released fix and test. Verified in N20050606-0010 Verified for 3.1 RC2 using build I20050610-0010 |