Summary: | Clarify documentation for ITypeHierarchy created on interface types | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> | ||||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | martinae, Olivier_Thomann | ||||||
Version: | 3.3 | ||||||||
Target Milestone: | 3.6 M1 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Dani Megert
2007-09-27 05:46:46 EDT
Sorry build id was wrong. Correct is: I20070925-1406. Created attachment 79273 [details]
Regression test
This test shows the current problem. I'm not sure why someone be broken by a fix, but since no one else reported the problem, I'm lowering the priority of this bug.
>I'm not sure why someone be broken by a fix,
For example if you used such code to test whether IType X is assignement compatbile with IType Y: X.newSupertypeHierarchy(null).contains(Y).
I would be tempted to only fix the javadoc as it can indeed break existing clients. Right. just fix the comment. Created attachment 140948 [details]
Proposed patch
th.getRootClasses(), th.getAllTypes() and th.getAllClasses() also return
the IType corresponding to java.lang.Object. So it seems fair to say that
interface hierarchies always contain java.lang.Object, except that the
get*Super*() methods filter it out as they claim in the documentation.
I have added a note in the javadoc for ITypeHierarchy to the effect that
"As a historical quirk, java.lang.Object has always been included in type hierarchies created on interface types."
Released in HEAD for 3.6M1 Verified for 3.6M1 |