Re: AW: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-11-24 Thread Roger Riggs
Nachricht- Von: core-libs-dev [mailto:core-libs-dev-r...@openjdk.org] Im Auftrag von Alan Bateman Gesendet: Sonntag, 24. November 2024 15:50 An: core-libs-dev@openjdk.org Betreff: Re: RFR: 8341566: Add Reader.of(CharSequence) [v15] On Sat, 23 Nov 2024 15:08:38 GMT, Markus KARG wrote: I have drafted

AW: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-11-24 Thread Markus Karg
bs-dev-r...@openjdk.org] Im Auftrag von Alan Bateman Gesendet: Sonntag, 24. November 2024 15:50 An: core-libs-dev@openjdk.org Betreff: Re: RFR: 8341566: Add Reader.of(CharSequence) [v15] On Sat, 23 Nov 2024 15:08:38 GMT, Markus KARG wrote: > I have drafted a release note for > [JDK-834

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-11-24 Thread Alan Bateman
On Sat, 23 Nov 2024 15:08:38 GMT, Markus KARG wrote: > I have drafted a release note for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566) in > [JDK-8344910](https://bugs.openjdk.org/browse/JDK-8344910). Kindly asking for > reviews! :-) Thanks for creating this. I've edited it so t

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-11-23 Thread Markus KARG
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-26 Thread Markus KARG
On Tue, 15 Oct 2024 10:43:54 GMT, Markus KARG wrote: >> That had been discussed here: >> https://github.com/openjdk/jdk/pull/21371#pullrequestreview-2350588453 > > Stay tuned. I have already forwarded a subsequent RFE and PR to cover this > topic. 🤩 I just filed the PR to implement `CharSequen

Re: RFR: 8341566: Add Reader.of(CharSequence) [v3]

2024-10-26 Thread Markus KARG
On Tue, 8 Oct 2024 09:06:42 GMT, Markus KARG wrote: >> I believe this batch operation would be a useful addition, but it is best >> reserved for another RFE. > > Agree to Chen. As I already wrote in [the > RFE](https://bugs.openjdk.org/browse/JDK-8341566): >>As this option is not essentially ne

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-24 Thread Chen Liang
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-24 Thread Markus KARG
On Wed, 23 Oct 2024 22:15:34 GMT, Kevin Bourrillion wrote: > An issue with the simple name `of` is that we may encounter calls like this: > > `Reader.of("/usr/share/dict/words")` > > ... that may look like they do something different. I can't say whether we > should consider this a serious iss

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Chen Liang
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Roger Riggs
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Kevin Bourrillion
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Jaikiran Pai
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Chen Liang
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread duke
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Markus KARG
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Chen Liang
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Chen Liang
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v14]

2024-10-23 Thread Markus KARG
On Mon, 21 Oct 2024 17:06:30 GMT, Chen Liang wrote: >> Will the Reader need to catch IndexOutOfBoundsException and >> BufferUnderFlowException then wrap them as EOFException? I would think these >> errors should not escape the Reader as is if a source CharBuffer limit is >> tampered with. Or

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Markus KARG
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Alan Bateman
On Wed, 23 Oct 2024 08:58:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]

2024-10-23 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence)

2024-10-23 Thread Alan Bateman
On Wed, 9 Oct 2024 10:40:53 GMT, Alan Bateman wrote: >>> @AlanBateman Can you please review [the CSR >>> request](https://bugs.openjdk.org/browse/JDK-8341596) so I can finish it? >>> Thanks! >> >> Latest API docs looks good, will you update the CSR? > >> @AlanBateman WDYT? > > A title like "A

Re: RFR: 8341566: Add Reader.of(CharSequence) [v14]

2024-10-22 Thread Markus KARG
On Mon, 21 Oct 2024 15:44:58 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence)

2024-10-22 Thread Markus KARG
On Wed, 9 Oct 2024 10:40:53 GMT, Alan Bateman wrote: >>> @AlanBateman Can you please review [the CSR >>> request](https://bugs.openjdk.org/browse/JDK-8341596) so I can finish it? >>> Thanks! >> >> Latest API docs looks good, will you update the CSR? > >> @AlanBateman WDYT? > > A title like "A

Re: RFR: 8341566: Add Reader.of(CharSequence) [v14]

2024-10-21 Thread Chen Liang
On Mon, 21 Oct 2024 17:00:55 GMT, Jason Mehrens wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed wording according to CSR discussion: ' The reader is initially >> open and reading starts at the first character

Re: RFR: 8341566: Add Reader.of(CharSequence) [v14]

2024-10-21 Thread Jason Mehrens
On Mon, 21 Oct 2024 15:44:58 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v14]

2024-10-21 Thread Chen Liang
On Mon, 21 Oct 2024 15:44:58 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v14]

2024-10-21 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v13]

2024-10-21 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v12]

2024-10-20 Thread Markus KARG
On Sun, 20 Oct 2024 10:20:57 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v12]

2024-10-20 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-17 Thread Roger Riggs
On Sat, 12 Oct 2024 07:47:56 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-15 Thread Markus KARG
On Mon, 14 Oct 2024 20:01:42 GMT, Rob Spoor wrote: >> src/java.base/share/classes/java/io/Reader.java line 214: >> >>> 212: cbuf[off + i] = cs.charAt(next + i); >>> 213: } >>> 214: } >> >> Just a drive-by observation, not for this

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-14 Thread Rob Spoor
On Mon, 14 Oct 2024 19:27:00 GMT, Eirik Bjørsnøs wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert 'inc should be faster than add on most CPUs' > > src/java.base/share/classes/java/io/Reader.java line 214: > >

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-14 Thread Eirik Bjørsnøs
On Sat, 12 Oct 2024 07:47:56 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-14 Thread Roger Riggs
On Sat, 12 Oct 2024 11:33:33 GMT, Markus KARG wrote: >> test/jdk/java/io/Reader/Of.java line 92: >> >>> 90: >>> 91: @Test(dataProvider = "readers") >>> 92: public void testReadBII(Reader reader) throws IOException { >> >> What does `BII` in some of these test method names represent? >

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-12 Thread Markus KARG
On Sat, 12 Oct 2024 08:24:37 GMT, Jaikiran Pai wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert 'inc should be faster than add on most CPUs' > > test/jdk/java/io/Reader/Of.java line 92: > >> 90: >> 91: @

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-12 Thread Jaikiran Pai
On Sat, 12 Oct 2024 07:47:56 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-12 Thread Markus KARG
On Sat, 12 Oct 2024 07:47:56 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-12 Thread Markus KARG
On Sat, 12 Oct 2024 06:57:40 GMT, Jaikiran Pai wrote: >> I would say this current version is fine: that's how we handle encode/decode >> loop in classes like `String`. > > I agree with Roger - the previous version you had: > > > for (int i = 0; i < n; i++) > cbuf[off + i] = cs.charAt(next

Re: RFR: 8341566: Add Reader.of(CharSequence) [v11]

2024-10-12 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-12 Thread Jaikiran Pai
On Fri, 11 Oct 2024 22:45:55 GMT, Chen Liang wrote: >> Uhm... actually that is a quite common pattern we even teach people >> everyday, and in the past 30 years none of them had a problem understanding >> it... 🤔 Anyways, really I don't see any benefit in this whole discussion, >> as I said,

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Chen Liang
On Fri, 11 Oct 2024 21:02:30 GMT, Markus KARG wrote: >> src/java.base/share/classes/java/io/Reader.java line 212: >> >>> 210: default -> { >>> 211: for (int i = next, j = next + n; i < j;) >>> 212: cbuf[off++] = cs.charAt(i+

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Markus KARG
On Fri, 11 Oct 2024 20:56:44 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> inc should be faster than add on most CPUs > > src/java.base/share/classes/java/io/Reader.java line 212: > >> 210:

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Roger Riggs
On Thu, 10 Oct 2024 21:10:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-11 Thread Chen Liang
On Wed, 9 Oct 2024 18:05:55 GMT, Chen Liang wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/j

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-11 Thread Markus KARG
On Wed, 9 Oct 2024 18:05:55 GMT, Chen Liang wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/j

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Markus KARG
On Fri, 11 Oct 2024 20:10:54 GMT, Roger Riggs wrote: > That's fine, but talking about performance improvements because of what you > think the compiler will do isn't productive. Make the source clear and > maintainable and low maintenance. tnx Uhm... actually I thought my change *made* it clea

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Roger Riggs
On Thu, 10 Oct 2024 21:10:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Markus KARG
On Fri, 11 Oct 2024 15:21:34 GMT, Roger Riggs wrote: > > I have slightly adapted the copy loop to allow CPUs to use solely > > single-operand INC within the loop instead of dual-operand ADD. > > Did you measure a performance improvement? Compiler optimizations are more > productive than spot s

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-11 Thread Roger Riggs
On Fri, 11 Oct 2024 06:16:02 GMT, Markus KARG wrote: > I have slightly adapted the copy loop to allow CPUs to use solely > single-operand INC within the loop instead of dual-operand ADD. Did you measure a performance improvement? Compiler optimizations are more productive than spot source chan

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 22:42:19 GMT, Bernd wrote: > > I have slightly adapted the copy loop to allow CPUs to use solely > > single-operand INC within the loop instead of dual-operand ADD. > > If that makes a difference we might need to consider fixing the Compiler :) Hm... really? In fact I am no

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Bernd
On Thu, 10 Oct 2024 21:12:50 GMT, Markus KARG wrote: > I have slightly adapted the copy loop to allow CPUs to use solely > single-operand INC within the loop instead of dual-operand ADD. If that makes a difference we might need to consider fixing the Compiler :) - PR Comment: http

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 21:10:30 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v10]

2024-10-10 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 14:32:30 GMT, Roger Riggs wrote: >> I think "release 24" is fine for now as similar text exists in >> `java.util.Vector`. We can normalize such texts when we implement >> https://bugs.openjdk.org/browse/JDK-8341736. > > Please remove the reference to JDK 24; it will age rapi

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 05:47:26 GMT, Markus KARG wrote: >> Currently uncontested locks have a performance regression after the removal >> of biased locking: A similar example with `StringBuffer` is available in >> #19513. > > I do not have any personal preferences here. The text was paraphrased fr

Re: RFR: 8341566: Add Reader.of(CharSequence) [v9]

2024-10-10 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Roger Riggs
On Thu, 10 Oct 2024 04:53:05 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/StringReader.java line 38: >> >>> 36: * {@code Reader.of(String)} should generally be used in preference to >>> this one, >>> 37: * as it supports all of the same operations but it is faster, as it >>>

Re: RFR: 8341566: Add Reader.of(CharSequence) [v8]

2024-10-10 Thread Roger Riggs
On Thu, 10 Oct 2024 07:32:53 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized impleme

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Wed, 9 Oct 2024 18:42:20 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Wed, 9 Oct 2024 19:19:04 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/Reader.java line 161: >> >>> 159: * {@code transferTo()} methods all throw {@code IOException}. >>> 160: * >>> 161: * The returned reader supports the {@link #mark mark()} >>> operation. >>

Re: RFR: 8341566: Add Reader.of(CharSequence) [v8]

2024-10-10 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-10 Thread Markus KARG
On Thu, 10 Oct 2024 04:50:18 GMT, Alan Bateman wrote: >> I see Alan and I have different views on the inclusion of the details. >> With only a single CharSequence argument, I can't see any ambiguity about >> the starting position. > >> I see Alan and I have different views on the inclusion of th

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 19:14:06 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/StringReader.java line 38: >> >>> 36: * {@code Reader.of(String)} should generally be used in preference to >>> this one, >>> 37: * as it supports all of the same operations but it is faster, as it >>>

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 21:12:10 GMT, Roger Riggs wrote: >> The test name follows the conventions currently applied in this folder. Feel >> free to propose a better name, I would be happy to change it. > > The test name should provide enough context so the *human* reader does not > have to hunt arou

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Chen Liang
On Thu, 10 Oct 2024 04:36:58 GMT, Alan Bateman wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.or

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Alan Bateman
On Wed, 9 Oct 2024 19:12:33 GMT, Roger Riggs wrote: > I see Alan and I have different views on the inclusion of the details. With > only a single CharSequence argument, I can't see any ambiguity about the > starting position. It could be a second sentence, "Reading starts at the first characte

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Alan Bateman
On Wed, 9 Oct 2024 11:49:47 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized implemen

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Roger Riggs
On Wed, 9 Oct 2024 20:08:25 GMT, Markus KARG wrote: >> test/jdk/java/io/Reader/Of.java line 40: >> >>> 38: * @bug 8341566 >>> 39: * @summary Check for expected behavior of Reader.of(). >>> 40: * @run testng Of >> >> The test name should be more descriptive. Without the package name it is >

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 18:59:58 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Chen Liang
On Wed, 9 Oct 2024 18:40:34 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Chen Liang
On Wed, 9 Oct 2024 18:56:19 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Roger Riggs
On Wed, 9 Oct 2024 18:37:53 GMT, Roger Riggs wrote: >> Markus KARG has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - assertThrows instead of expectedExceptions >> - ordered jtreg tags according recommendation in >> https://openjdk.org/

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Roger Riggs
On Wed, 9 Oct 2024 11:49:47 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized implemen

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Chen Liang
On Wed, 9 Oct 2024 11:49:47 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized implemen

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 11:49:47 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized implemen

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Chen Liang
On Wed, 9 Oct 2024 11:49:47 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized implemen

Re: RFR: 8341566: Add Reader.of(CharSequence)

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 10:40:53 GMT, Alan Bateman wrote: >>> @AlanBateman Can you please review [the CSR >>> request](https://bugs.openjdk.org/browse/JDK-8341596) so I can finish it? >>> Thanks! >> >> Latest API docs looks good, will you update the CSR? > >> @AlanBateman WDYT? > > A title like "A

Re: RFR: 8341566: Add Reader.of(CharSequence) [v6]

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 07:21:48 GMT, Jaikiran Pai wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improved wording: 'If the sequence changes while the reader is open, e.g. >> the length changes, the behavior is undefin

Re: RFR: 8341566: Add Reader.of(CharSequence)

2024-10-09 Thread Markus KARG
On Wed, 9 Oct 2024 10:40:53 GMT, Alan Bateman wrote: > > @AlanBateman WDYT? > > A title like "Add Reader.of(CharSequence)" would make it clear to everyone > what this issue, and the CSR, is about. Changed in PR, RFE and CSR. - PR Comment: https://git.openjdk.org/jdk/pull/21371#is

Re: RFR: 8341566: Add Reader.of(CharSequence) [v7]

2024-10-09 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im