-
Enhancement
-
Resolution: Fixed
-
P3
-
13
-
b18
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.
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.
- blocks
-
JDK-8219945 refactor/simplify structure of docs generated by javadoc
- Resolved