-
Enhancement
-
Resolution: Unresolved
-
P4
-
11
-
None
-
generic
-
generic
JavaDoc uses various HTML and CSS features to control how signatures can be wrapped if their content overflows the available space. Unfortunately, the feature has degraded over time as signature generating code has been added or changed without taking line wrapping into consideration.
For example, we us non-breaking-space between parameter type and parameter name so that parameters are kept kept on a single line, but we don't use non-breaking space for bounded type parameters/wildcards, so if a method parameter has a bounded parameter type line wrapping can and typically will occur there (and this is a much worse place than between parameter type and name).
Another problem is that the "?" character in wildcards as a punctuation mark is considered a place where line wraps are allowed, leading to `<?>` to be wrapped after the question mark. This is also one of the worst places to wrap a type signature.
Other minor issues are the use of non-breaking space in method signatures between modifiers, type parameters and return type. While these pleaces usually don't require line wrapping there are very long signatures that do.
For example, we us non-breaking-space between parameter type and parameter name so that parameters are kept kept on a single line, but we don't use non-breaking space for bounded type parameters/wildcards, so if a method parameter has a bounded parameter type line wrapping can and typically will occur there (and this is a much worse place than between parameter type and name).
Another problem is that the "?" character in wildcards as a punctuation mark is considered a place where line wraps are allowed, leading to `<?>` to be wrapped after the question mark. This is also one of the worst places to wrap a type signature.
Other minor issues are the use of non-breaking space in method signatures between modifiers, type parameters and return type. While these pleaces usually don't require line wrapping there are very long signatures that do.