8042654: [javadoc] revert the default methods list.sort to Collections.sort
authorksrini
Wed, 07 May 2014 15:54:16 -0700
changeset 24297 84baad0ac4d7
parent 24296 296e59a84663
child 24298 cc4f0f71a505
8042654: [javadoc] revert the default methods list.sort to Collections.sort Reviewed-by: jfranck, jjg
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Thu May 08 00:22:31 2014 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Wed May 07 15:54:16 2014 -0700
@@ -180,7 +180,7 @@
         Map<String,List<ProgramElementDoc>> map = new HashMap<>();
         List<? extends ProgramElementDoc> list= classMap.get(classdoc.qualifiedName());
         if (list != null) {
-            list.sort(Util.makeComparatorForClassUse());
+            Collections.sort(list, Util.makeComparatorForClassUse());
             for (ProgramElementDoc doc : list) {
                 PackageDoc pkg = doc.containingPackage();
                 pkgSet.add(pkg);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Thu May 08 00:22:31 2014 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Wed May 07 15:54:16 2014 -0700
@@ -112,7 +112,7 @@
      */
     protected void sortIndexMap() {
         for (List<Doc> docs : indexmap.values()) {
-            docs.sort(Util.makeComparatorForIndexUse());
+            Collections.sort(docs, Util.makeComparatorForIndexUse());
         }
     }