Summary: | Subtype not found if parameterized on inner class | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | David Saff <david> | ||||||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | dirk_baeumer, martinae, philippe_mulet | ||||||||||
Version: | 3.1 | ||||||||||||
Target Milestone: | 3.1 RC3 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows XP | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
David Saff
2005-06-13 06:56:00 EDT
Only happens when ArrayList is paramterized with Sub.Color. Works for class Sub extends ArrayList<String> { static class Color {} } however you have to close the type hiearchy view and reopen it. Type Sub is also missing in the quick type hierarchy. Moving to JDT/Core. Jerome - pls investigate as a possible RC3 candidate Created attachment 23153 [details]
Change in SourceIndexerRequestor and DiskIndex
Problem was in SourceIndexRequestor that didn't extract correctly the simple
name when the type was parameterized with a member type (Y<X.Color>).
Changed SourceIndexerRequestor to correctly extract the simple name in this
case and changed the DiskIndex version number to force reindexing.
Created attachment 23154 [details]
Regression test
+1 for RC3 Dirk - pls cast your vote I know that I put the bug onto the important list of JDT/UI but given the overall bug load and the "more than one line" fix I opt to postpone this one. But this might be simply my paranoia. Comments from JDT/Core side ? A couple of findings + int length = length = typeName.length; looks strange to me. Is it sure that the typeName never ends with a dot. Otherwise lastDot + 1 will be outside of the char array. And can it happend that typename looks like <nn.xx> when lastDot > lastGenericStart. Might be a good 3.1.1 item. I would fix it still. Will review change with Jerome. Note that I would walk the type name backwards instead. Change reviewed. Looks ok once loop is backward and weird assignment removed (compiler should diagnose it). Created attachment 23280 [details]
Improved fix
Removed the int length = length = ... assignment (thanks Dirk).
Now looping from end to start.
Created attachment 23281 [details]
Regression test
(previous regression test was for another bug)
Reviewed improved fix. +1 for RC3. Thanks Dirk. Released improved fix and regression test. Verified using N20050616-0010 + JDT/Core HEAD |