| Summary: | javax.lang.model.element.Element.getEnclosingElement() doesn't return null for type parameter | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||||
| Component: | APT | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | trivial | ||||||||||
| Priority: | P3 | CC: | eclipse | ||||||||
| Version: | 3.7 | ||||||||||
| Target Milestone: | 3.7 M7 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Olivier Thomann
Created attachment 192946 [details]
Proposed fix + regression test
Walter, I would take care of releasing this.
Are you ok with that change ?
Created attachment 192947 [details]
Proposed fix + regression test
Same patch with updated copyrights.
Created attachment 192948 [details]
Proposed fix + regression test
Improved regression test to check that the getEnclosingElement() is equals to the getGenericElement() for type parameter instead of just checking it is not null.
Sounds like a typical case of Sun changing the spec to match their implementation, rather than changing the implementation to match the spec. I checked the Sun bug database but I don't see any commentary on this. I think it is okay to change the behavior for 3.7 given that javac 1.6 works this way. Released for 3.7M7. |