Summary: | JavaElement of a recovered type binding should not return a compilation unit with no parent | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | david_audel, jerome_lanneluc, martinae | ||||||||
Version: | 3.3 | ||||||||||
Target Milestone: | 3.3.1 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Olivier Thomann
2007-08-24 12:26:24 EDT
Created attachment 76926 [details]
Proposed fix
We use the IJavaElement of the package binding corresponding to the recovered type binding as the package fragment to build the fake compilation unit.
Martin, How does this sound? Created attachment 76927 [details]
Regression test
Released for 3.4M2. Jérôme, Should this be a candidate for 3.3.1? Regression test added in org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0283 Sounds good to me! Thanks! +1 for 3.3.1 since clients never expect null as the parent of an ICompilationUnit. Not fixing this bug could cause NullPointerExceptions in client code. Created attachment 77026 [details]
Proposed fix + regression test
Patch updated for 3.3.1.
Reopen for 3.3.1 Released for 3.3.1. Regression test in org.eclipse.jdt.core.tests.dom.ASTConverter15Test#test0283 Verified for 3.3.1 using build M20070831-2000. |