On Wed, 22 Feb 2023 16:02:16 GMT, Darragh Clarke <[email protected]> wrote:
>> Refactored instances of `@code` to instead use `@snippet`.
>>
>> I also spent some time looking into using external snippets to reference the
>> existing files `JavadocExamples` and `WebSocketExample` though ultimately
>> thought it was better to keep the docs pretty much as they had been with
>> only a few small changes to formatting.
>
> Darragh Clarke has updated the pull request incrementally with one additional
> commit since the last revision:
>
> cleaned up formatting, fixed snippets breaking when code sample starts on
> same line
src/java.net.http/share/classes/java/net/http/HttpRequest.java line 571:
> 569: *
> 570: * {@snippet :
> 571: * // Request body from a String
Since this snippet contains three different individual examples it would be
better to have each example in its own snippet.
src/java.net.http/share/classes/java/net/http/HttpResponse.java line 279:
> 277: * convert a flow of response body data into common high-level Java
> objects:
> 278: *
> 279: * {@snippet :
Same remark here. It would make more sense to have each example in its own
snippet.
src/java.net.http/share/classes/java/net/http/HttpResponse.java line 917:
> 915: *
> 916: * {@snippet :
> 917: * // Streams the response body to a File
And here as well.
-------------
PR: https://git.openjdk.org/jdk/pull/12692