From jonathan.gibbons at oracle.com Tue May 19 22:27:24 2015 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Tue, 19 May 2015 15:27:24 -0700 Subject: langtools/javadoc: Random order in package-tree.html In-Reply-To: <555BB0D0.1040809@apache.org> References: <555BB0D0.1040809@apache.org> Message-ID: <555BB8CC.7040203@oracle.com> Emmanuel, Thanks for this report. As outlined in JEP 221 [1] we are currently working on rewriting substantial parts of javadoc. The work is being done in the javadoc.next project [2]. As part of this work, we have encountered and fixed a number of issues such as you describe, and so it may be the case that we have already fixed this one in JDK 9. Comparing the source trees for JDK 8 and JDK 9, I see the following changes in ClassTree.java: JDK 8: private List baseEnums = new ArrayList(); private Map> subEnums = new HashMap>(); JDK 9: final private SortedSet baseEnums; final private Map> subEnums = new HashMap<>(); So it looks like the collections are now organized as sorted sets instead of lists, so in JDK 9 at least, I believe we are OK. In general, the changes happening in 9 are too big to backport to 8u, which leaves the question of whether we should patch a fix in the jdk8u forest. The concept of your patch looks reasonable, but since it cannot be applied to 9, we cannot follow the usual practice of "fix in 9, backport to 8u". Also, although we have better testing support in JDK 9 that was written to address problems like this, that support is not available in JDK 8, making it harder (but not impossible, of course) to write tests for any patch to 8u. -- Jon [1] http://openjdk.java.net/jeps/221 [2] http://openjdk.java.net/projects/javadoc-next/ On 05/19/2015 02:53 PM, Emmanuel Bourg wrote: > Hi Jonathan, > > The Debian Reproducible Builds Team has noticed that the > package-tree.html files generated by javadoc contains unsorted entries > (see for example the diff from mockito [1] and easymock [2]). It seems > to affect only the Enums and the annotations type. > > I investigated this a bit and I think it comes from the > ClassTree.buildTree() method [3] where the interfaces and the classes > are sorted, but not the enums nor the annotations types. > > I wanted to check with you if applying the same sort loop on > enums/annotations would be appropriate, something like: > > Collections.sort(baseEnums); > for (Iterator> it = subEnums.values().iterator(); > it.hasNext(); ) { > Collections.sort(it.next()); > } > > Collections.sort(baseAnnotationTypes); > for (Iterator> it = > subAnnotationTypes.values().iterator(); it.hasNext(); ) { > Collections.sort(it.next()); > } > > If it's ok I'll patch the openjdk package in Debian. Do you think this > could also be fixed in OpenJDK upstream? > > Thank you, > > Emmanuel Bourg > > [1] https://reproducible.debian.net/rb-pkg/unstable/amd64/mockito.html > [2] https://reproducible.debian.net/rb-pkg/unstable/amd64/easymock.html > [3] > http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/file/ecb7e46b820f/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java#l116 From alexander.v.stepanov at oracle.com Thu May 21 16:12:49 2015 From: alexander.v.stepanov at oracle.com (alexander stepanov) Date: Thu, 21 May 2015 16:12:49 -0000 Subject: RFR [9] 8080880: some docs cleanup for langtools In-Reply-To: <555E02BE.7020407@oracle.com> References: <555E02BE.7020407@oracle.com> Message-ID: <555E03FB.40803@oracle.com> Hello, Could you please review the following fix http://cr.openjdk.java.net/~avstepan/8080880/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8080880 Just some minor fix for docs, no other code touched. The affected packages should (probably) not be visible in the new modular system, but nevertheless... Thanks, Alexander