RFR: 8207190: JDK 11 javadoc generates bad code example
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Jul 30 23:07:26 UTC 2018
Agreed on Sundar's previous comment.
Having a <pre> tag with a CSS style that sets something other than
white-space:pre seems a curious choice, especially when you choose
white-space:normal. (But, I also note that this is not new to this issue.)
It's not clear to me that any tests show the (fix for the) bad behavior
described in the bug. Since this is essentially a regression test, I
would expect to see a test that can be used to demo the problem (without
the fix) and demo the absence of the problem (with the fix) ... even if
this is a manual test where we have to look at the text before and after
in a browser, and/or you provide screenshots.
Also, why just on method signatures? what about very long generic
field signatures? is there a potential problem lurking there?
Finally, note that in an ideal world, the stylesheet used by the
standard doclet would be a public supported specification, and so in
theory at least, you are changing a public interface here.
-- Jon
On 07/16/2018 03:20 AM, Priya Lakshmi Muthuswamy wrote:
> Thanks Sundar.
> Updated webrev :
> http://cr.openjdk.java.net/~pmuthuswamy/8207190/webrev.01/
>
> Regards,
> Priya
>
> On 7/16/2018 2:24 PM, Sundararajan Athijegannathan wrote:
>> In MethodWriterImpl.getSignature method: "pre" variable could be
>> declared to be of static type HtmlTree so that you can avoid the cast
>> in the very next line - or perhaps you could just use "var" for the
>> declaration.
>>
>> -Sundar
>>
>> On 16/07/18, 1:53 PM, Priya Lakshmi Muthuswamy wrote:
>>> Hi,
>>>
>>> Kindly the fix for https://bugs.openjdk.java.net/browse/JDK-8207190
>>> webrev : http://cr.openjdk.java.net/~pmuthuswamy/8207190/webrev.00/
>>>
>>> This issue was caused as part of the fix for JDK-8187288 (bad (no)
>>> wrapping for modifier and type column)
>>> When the method has lots of modifiers and arguments, the method
>>> signature gets very long doesn't fit within the page.
>>> Instead of changing the white-space property in the pre tag of
>>> details section, changing it only for the method signature.
>>>
>>> Thanks,
>>> Priya
>
More information about the javadoc-dev
mailing list