Re: RFR [9]: Consistent order of 'Annotation Type Hierarchy' & 'Enum Hierarchy’ sections.
Chris Hegarty
chris.hegarty at oracle.com
Mon Jul 21 17:11:22 UTC 2014
Thanks Kumar,
I have not filed a bug on this yet, so you can simply incorporate these changes into your bug.
-Chris
> On 21 Jul 2014, at 17:28, Kumar Srinivasan <kumar.x.srinivasan at oracle.com> wrote:
>
> indeed!, this has been somewhat trouble some, I am fixing many of these:
> https://bugs.openjdk.java.net/browse/JDK-8050031
>
> and I will be glad to address this particular item as well, as part of that fix,
> you can reassign that bug to me, with your patch.
>
> Kumar
>
>> On 7/21/2014 5:45 AM, Alan Bateman wrote:
>>> On 18/07/2014 18:16, Chris Hegarty wrote:
>>> This is a small code review request for an issue I encountered when trying to compare the result of the output of a docs build from two JDK repos. I’ll file a bug on it soon.
>>>
>>> The issue is that the 'Annotation Type Hierarchy' & 'Enum Hierarchy’ sections of ‘Use' and ‘Tree’ view for a package are not always in the same order ( the issue may appear in other views too, but these are the only ones I observed). The implementation uses a List, whose elements may be added in a different order, depending on encounter order. These elements should be ordered, as others are. It just appears to be an oversight in the original implementation.
>>>
>>> diff --git a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
>>> --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
>>> +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
>>> @@ -155,12 +155,21 @@
>>> }
>>> Collections.sort(baseinterfaces);
>>> + Collections.sort(baseAnnotationTypes);
>>> + Collections.sort(baseEnums);
>>> for (List<ClassDoc> docs : subinterfaces.values()) {
>>> Collections.sort(docs);
>>> }
>>> for (List<ClassDoc> docs : subclasses.values()) {
>>> Collections.sort(docs);
>>> }
>>> + for (List<ClassDoc> docs : subAnnotationTypes.values()) {
>>> + Collections.sort(docs);
>>> + }
>>> + for (List<ClassDoc> docs : subEnums.values()) {
>>> + Collections.sort(docs);
>>> + }
>>> +
>>> }
>> This looks okay to me but probably best to get a Reviewer that is working in this area, Kumar?
>>
>> -Alan.
>
More information about the javadoc-dev
mailing list