Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-06 Thread Markus KARG
On Sun, 4 May 2025 05:08:46 GMT, Alan Bateman wrote: >> Oh, and we should set `next` afterwards, so the `Reader` knows that the end >> of the sequence is reached: >> >> >> public String readAllChars() throws IOException { >> ensureOpen(); >> var len = cs.length(); >> var remainder

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-05 Thread Brian Burkhalter
On Fri, 2 May 2025 19:38:11 GMT, Rémi Forax wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: Fix readAllChars gaffe in Reader returned by Readed.of and >> account for it in test > > test/jdk/java/io/Bu

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-05 Thread Brian Burkhalter
On Thu, 1 May 2025 18:00:54 GMT, Stuart Marks wrote: > I'd suggest not having this method's implementation depend on an overridable > method. I'm jumping the gun here by referring to an implementation detail, but the overridable method problem could be circumvented using an approach taken in

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-05 Thread Brian Burkhalter
On Fri, 2 May 2025 19:00:42 GMT, Stuart Marks wrote: > I think it's still ambiguous. [...] Without addressing the specific comments, I would simply like to point out that "as if" and "equivalent" is common phrasing in this area, e.g., - [File.toPath](https://docs.oracle.com/en/java/javase/24/

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-03 Thread Alan Bateman
On Sat, 3 May 2025 09:30:17 GMT, Markus KARG wrote: >> src/java.base/share/classes/java/io/Reader.java line 213: >> >>> 211: public String readAllChars() throws IOException { >>> 212: ensureOpen(); >>> 213: return cs.toString().substring(next); >> >>

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-03 Thread Markus KARG
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-03 Thread Markus KARG
On Sat, 3 May 2025 07:25:09 GMT, Markus KARG wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: Fix readAllChars gaffe in Reader returned by Readed.of and >> account for it in test > > src/java.base/shar

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-03 Thread Markus KARG
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-03 Thread Markus KARG
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-02 Thread Stuart Marks
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-02 Thread Rémi Forax
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-02 Thread Archie Cobbs
On Fri, May 2, 2025 at 2:04 PM Stuart Marks wrote: > There was a back-and-forth a while ago -- I think @bplb was involved -- > where there was similar wording about something being "equivalent to" or > "as if" foo() was called, and the person was insistent that this meant that > foo() should actu

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-02 Thread Stuart Marks
On Thu, 1 May 2025 19:19:32 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/io/Reader.java line 408: >> >>> 406: * This method works as if invoking it were equivalent to >>> evaluating >>> 407: * the expression: >>> 408: * {@linkplain >>> #readAllChars()}.lines().to

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-01 Thread Roger Riggs
On Thu, 1 May 2025 17:51:53 GMT, Stuart Marks wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8354724: Fix readAllChars gaffe in Reader returned by Readed.of and >> account for it in test > > src/java.base/sha

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-01 Thread Stuart Marks
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-01 Thread Stuart Marks
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-05-01 Thread Stuart Marks
On Wed, 23 Apr 2025 22:04:25 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Fix readAllChars gaffe in Reader returned by

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v14]

2025-04-23 Thread Brian Burkhalter
> Implement the requested methods and add a test thereof. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8354724: Fix readAllChars gaffe in Reader returned by Readed.of and account for it in test - Changes: - all