RFR: 8214126: Method signatures not formatted correctly in browser

Hannes Wallnöfer hannes.wallnoefer at oracle.com
Tue Apr 2 14:48:11 UTC 2019


Please review: 

Issue: https://bugs.openjdk.java.net/browse/JDK-8214126
Webrev: http://cr.openjdk.java.net/~hannesw/8214126/webrev.00/

In JDK 11 we changed rendering of method signatures in the method details section of class pages to non-preformatted rendering. The reason was that long list of type parameters would completely derail the rendering of signatures (see JDK-8187288).

Since I think the preformatting is actually quite valuable for more complex signatures I reintroduced it and added code to insert line breaks for very long type parameter lists. This also fixes a bug in RawHtml::charCount so that the zero-width-space entity is not counted as adding to the character count.

You can see before/after screenshots attached to the Jira issue. (These screenshots are generated from the test in this patch.)

https://bugs.openjdk.java.net/secure/attachment/81939/simple-methods-bad.png
https://bugs.openjdk.java.net/secure/attachment/81940/simple-methods-fixed.png
https://bugs.openjdk.java.net/secure/attachment/81937/generic-annotated-bad.png
https://bugs.openjdk.java.net/secure/attachment/81938/generic-annotated-fixed.png

Thanks,
Hannes


More information about the javadoc-dev mailing list