RFR: 8356420: Provide examples on wrapping System.in [v2]

Chen Liang liach at openjdk.org
Fri May 9 20:56:53 UTC 2025


On Fri, 9 May 2025 20:39:27 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> With the introduction of `stdin.encoding` ([JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703)), some guidance for users to decode `System.in` would be desirable. Adding examples in the field description would help.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Reflects a review comment

src/java.base/share/classes/java/util/Scanner.java line 81:

> 79:  * }
> 80:  *
> 81:  * <p>To read lines from {@link System#in} with {@link System##stdin.encoding

Other 2 example paragraphs start with "this code allows..." and I think we should start this paragraph with: (you might need to wrap lines)
Suggestion:

 * <p>This code reads lines from {@link System#in} with {@link System##stdin.encoding

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25155#discussion_r2082482111


More information about the core-libs-dev mailing list