RFR: 8308016: Use snippets in java.io package

Brian Burkhalter bpb at openjdk.org
Fri May 12 17:55:44 UTC 2023


On Fri, 12 May 2023 17:31:32 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> Replace `<pre>{@code ...}</pre>` patterns and the like with `{@snippet lang=java : ...}`.
>
> src/java.base/share/classes/java/io/Console.java line 124:
> 
>> 122:      *         if (con != null) {
>> 123:      *             Scanner sc = new Scanner(con.reader());
>> 124:      *             ...
> 
> I'm not sure how you feel about this, but when I have been converting `<pre>` blocks to `@snippet`, I usually try to get rid of non code. Since snippet allows user's to copy the example code, I feel like it's redudant to leave in non code, since they will likely delete it anyways.

I have been just trying to keep it as similar visually as possible but what you say is reasonable.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13957#discussion_r1192652789



More information about the security-dev mailing list