Summary: | NPE in ITypeBinding#getName() for intersection type | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | jarthana, Olivier_Thomann | ||||
Version: | 3.7 | ||||||
Target Milestone: | 3.7 M7 | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Markus Keller
2011-04-04 05:59:46 EDT
Note that the problematic binding is not the type binding for the expression type of "combine(s, i)", but the result of calling getGenericTypeOfWildcardType() on that type. I have a trivial fix for this one. The method getGenericTypeOfWildcardType() should return null for an intersection type. Created attachment 192758 [details] Proposed fix + regression test I don't touch other cases for intersection types like getRank(), isUpperBound(), getName(), getQualifiedName(), getBound(). This will be done when fixing bug 99931. Released in HEAD and BETA_JAVA7 branch. The NPE came from trying to display the name of the generic type of wildcard for an intersection type. To prevent it, the call to getGenericTypeOfWildcardType() now returns null for intersection type. Verified for 3.7M7 using build I20110421-1800 |