Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8161926

Elements displayed in module summary page is not ordered.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 9
    • tools
    • None

      Running diffs on before and after of javadoc output display inconsistent results, for clarity the diffs have been attached.

      This particular case is in ModuleWriterImpl.java
           tdModules.addStyle(HtmlStyle.colSecond);
              List<? extends ModuleElement> targetModules = direct.getTargetModules();
              if (targetModules != null) {
                  List<? extends ModuleElement> mElements = direct.getTargetModules();
                  for (int i = 0; i < mElements.size(); i++) {
                      if (i > 0) {
                          tdModules.addContent(new HtmlTree(HtmlTag.BR));
                      }
                      ModuleElement m = mElements.get(i);
                      tdModules.addContent(new StringContent(m.getQualifiedName().toString()));
                  }

      The trouble in general is that the directives returned from a module descriptor is not deterministic. So this affects all these kinds of call sites. This must be fixed in either of two ways:
      a. make the get*directive calls made to return consistent ordering
      OR
      b. introduce utility (Utils.java) methods which will return SortedSets and use these in all pertinent call sites.

        1. diff.txt
          8 kB
          Kumar Srinivasan

            bpatel Bhavesh Patel (Inactive)
            ksrini Kumar Srinivasan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: