RFR: 8214738 : javadoc should honor styles in doc-files

Jonathan Gibbons jonathan.gibbons at oracle.com
Thu Dec 20 19:31:18 UTC 2018



On 12/19/2018 08:38 PM, Priya Lakshmi Muthuswamy wrote:
> Hi,
>
> Kindly review the fix for 
> https://bugs.openjdk.java.net/browse/JDK-8214738
> webrev : http://cr.openjdk.java.net/~pmuthuswamy/8214738/webrev.00/
>
> Thanks,
> Priya
>
>

I don't think you need to add anything (userHeaderTags etc) to Head.
Head already has the requisite feature, "extraContent" and "addContent"
which can be used to add content into the <head> element.

Re: 
Utils.toLowerCase(nodeEnd.getName().toString()).equals(HtmlTag.HEAD.getText())
Don't use long-winded String comparison when you have type-safe comparison.
In this case, you should be able to do something like
     HtmlTag.get(nodeEnd.getName()) == HtmlTag.HEAD

getLocalHeaderTags needlessly walks through all the <body> element. You can
break out of the loop once you hit </head>.

DocFilesHandlerImpl:196.
The "if" statement is a waste of time and effort. The code will work 
perfectly
well when localTagsContent is an empty list, so you can simplify 196-199 
to just 197.

TestCopyFiles.java
(style) re: indenting the continuation of multi-line strings
The general Java style for breaking long expressions is to break before 
a binary operator, not after.
The style in other javadoc tests is to not indent the continuation 
expressions, so that it is easier
to see how the first line and subsequent lines are aligned.

-- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20181220/fb8171a8/attachment.html>


More information about the javadoc-dev mailing list