RFR: JDK-8222669: Create and use new html.Entity class

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Apr 19 00:13:00 UTC 2019



On 04/18/2019 07:33 AM, Jonathan Gibbons wrote:
>>
>> The only suggestion I have is that there are three almost identical 
>> pieces of code that escape a String to a StringBuilder. It would be 
>> nice to factor that out into a shared method somewhere.
>
> Yes, I was aware of that when I was modifying the code.  The code is 
> not quite identical, but now that you make me look at it again, I can 
> see how to make it happen. That will be a nice addition to this 
> cleanup.  Thanks for pointing this out. 

There's no one great place to put the shared code, which is mostly why 
it hadn't been shared before.

But the new Entity class is not a bad place, and so I introduced new 
shared code as static methods there, and updated StringContent.java, 
FixedStringContent and HtmlTree.java accordingly.  No other changes to 
any other files.

New webrev:  http://cr.openjdk.java.net/~jjg/8222669/webrev.00/

-- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20190418/06ecdfd0/attachment.html>


More information about the javadoc-dev mailing list