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

Eliminate inherently singleton lists

    Details

      Description

      javadoc generates lists in a number of places where the number of elements in the list is inherently, always exactly 1.

      For example, in the "Method Details" section of a class declaration page, each method in the enclosing list is itself represented by a list with just one element.

      This seems like an anti-pattern. It's OK to have lists that may contain one or more elements, depending on the inpuyt data, but generating a list when it will always have just one element is just creating noise in the overall structure.

      Note that removing some of these lists may necessitate making updates to the stylesheet.

      A preliminary patch is attached with a test to detect singleton lists. While the test shows lots of low-hanging fruit, there may be some genuine singleton entries that are false positives, such as entries in index lists.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pmuthuswamy Priya Lakshmi Muthuswamy (Inactive)
                Reporter:
                jjg Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: