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

2025-05-14 Thread Naoto Sato
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato 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. > > Nao

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

2025-05-13 Thread Chen Liang
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato 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. > > Nao

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

2025-05-13 Thread Volkan Yazici
On Tue, 13 May 2025 12:34:01 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/InputStreamReader.java line 59: >> >>> 57: * new InputStreamReader(System.in, >>> System.getProperty("stdin.encoding")); >>> 58: * } >>> 59: * >> >> There are several places in the sources that st

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

2025-05-13 Thread Naoto Sato
On Tue, 13 May 2025 16:21:36 GMT, Naoto Sato wrote: >> How did you search for those sources? I searched for literal `System.in` and >> my comments are the only ones I could find in the JDK. > > There are several locations in the jdk source (I simply grep'ed for `new > InputStreamReader(System.i

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

2025-05-13 Thread Naoto Sato
On Tue, 13 May 2025 12:34:01 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/InputStreamReader.java line 59: >> >>> 57: * new InputStreamReader(System.in, >>> System.getProperty("stdin.encoding")); >>> 58: * } >>> 59: * >> >> There are several places in the sources that st

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

2025-05-13 Thread Chen Liang
On Tue, 13 May 2025 11:39:16 GMT, Volkan Yazici wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removed an erroneous curly brace > > src/java.base/share/classes/java/io/InputStreamReader.java line 59: > >> 57: *

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

2025-05-13 Thread Volkan Yazici
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato 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. > > Nao

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

2025-05-13 Thread Alan Bateman
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato 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. > > Nao

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

2025-05-12 Thread Stuart Marks
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato 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. > > Nao

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

2025-05-12 Thread Naoto Sato
> 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 a

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

2025-05-12 Thread Naoto Sato
On Tue, 13 May 2025 00:55:14 GMT, Stuart Marks wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflects more comments > > src/java.base/share/classes/java/lang/System.java line 129: > >> 127: * within the objec

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

2025-05-12 Thread Naoto Sato
> 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 a

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

2025-05-12 Thread Stuart Marks
On Mon, 12 May 2025 21:59:29 GMT, Naoto Sato 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. > > Nao

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

2025-05-12 Thread Stuart Marks
On Mon, 12 May 2025 21:59:29 GMT, Naoto Sato 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. > > Nao

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

2025-05-12 Thread Chen Liang
On Mon, 12 May 2025 21:59:29 GMT, Naoto Sato 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. > > Nao

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

2025-05-12 Thread Joe Darcy
On Mon, 12 May 2025 23:21:15 GMT, Chen Liang wrote: > Do we need a CSR for this? No; from a quick look, I don't see a need for a CSR here as the semantics aren't being changed. HTH - PR Comment: https://git.openjdk.org/jdk/pull/25155#issuecomment-2874629944

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

2025-05-12 Thread Chen Liang
On Mon, 12 May 2025 21:59:29 GMT, Naoto Sato 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. > > Nao

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

2025-05-12 Thread Naoto Sato
On Mon, 12 May 2025 07:21:49 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflects another review comment > > src/java.base/share/classes/java/io/InputStreamReader.java line 54: > >> 52: * } >>

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

2025-05-12 Thread Naoto Sato
> 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 a

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

2025-05-12 Thread Naoto Sato
On Sun, 11 May 2025 16:46:42 GMT, Alan Bateman wrote: > 1. FileDescriptor.in: Unfortunately FileInputStream(FileDescriptor) has no > overload that supports custom charsets. We should probably document both on > this FD and that constructor. The description of `FileDescriptor.in` reads: Usuall

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

2025-05-12 Thread Alan Bateman
On Fri, 9 May 2025 21:29:09 GMT, Naoto Sato 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. > > Naot

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

2025-05-11 Thread Chen Liang
On Fri, 9 May 2025 21:29:09 GMT, Naoto Sato 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. > > Naot

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

2025-05-11 Thread Alan Bateman
On Sun, 11 May 2025 15:15:17 GMT, Chen Liang wrote: > 1. FileDescriptor.in: Unfortunately FileInputStream(FileDescriptor) has no > overload that supports custom charsets. We should probably document both on > this FD and that constructor. FYI, FileInputStream is an InputStream so reading bytes

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

2025-05-11 Thread Chen Liang
On Fri, 9 May 2025 21:29:09 GMT, Naoto Sato 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. > > Naot

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

2025-05-09 Thread Chen Liang
On Fri, 9 May 2025 20:39:27 GMT, Naoto Sato 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. > > Naot

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

2025-05-09 Thread Naoto Sato
On Fri, 9 May 2025 20:53:42 GMT, Chen Liang wrote: >> 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: *

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

2025-05-09 Thread Naoto Sato
On Fri, 9 May 2025 21:10:02 GMT, Roger Riggs wrote: >> 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/lang/System.java line 135: > >> 133: * {@snippet lang=

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

2025-05-09 Thread Naoto Sato
On Fri, 9 May 2025 20:15:48 GMT, Brian Burkhalter wrote: >> 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/lang/System.java line 136: > >> 134: * new In

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

2025-05-09 Thread Naoto Sato
> 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 a

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

2025-05-09 Thread Roger Riggs
On Fri, 9 May 2025 20:39:27 GMT, Naoto Sato 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. > > Naot

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

2025-05-09 Thread Iris Clark
On Fri, 9 May 2025 20:39:27 GMT, Naoto Sato 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. > > Naot

Re: RFR: 8356420: Provide examples on wrapping System.in

2025-05-09 Thread Brian Burkhalter
On Fri, 9 May 2025 19:53:24 GMT, Naoto Sato 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. Looks good.

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

2025-05-09 Thread Brian Burkhalter
On Fri, 9 May 2025 20:31:51 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/lang/System.java line 136: >> >>> 134: * new InputStreamReader(System.in, >>> System.getProperty("stdin.encoding")); >>> 135: * } >>> 136: * Or with a {@link java.util.Scanner Scanner}: >>

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

2025-05-09 Thread Brian Burkhalter
On Fri, 9 May 2025 20:36:07 GMT, Naoto Sato 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. > > Naot

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

2025-05-09 Thread Naoto Sato
> 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 a

RFR: 8356420: Provide examples on wrapping System.in

2025-05-09 Thread Naoto Sato
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. - Commit messages: - initial commit Changes: https://git.