Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection [v2]

2023-04-08 Thread Tingjun Yuan
On Sun, 9 Apr 2023 02:33:07 GMT, Chen Liang wrote: >> Tingjun Yuan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add benchmark > > This appears to be a 4% improvement for non-concurrent structures like > ArrayList or LinkedHashSet, if

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread Tingjun Yuan
On Sun, 9 Apr 2023 02:11:44 GMT, jmehrens wrote: >> In the current implementation of `String.join(CharSequence, Iterable)`, the >> temp array `elems` is always initialized with a length of 8. It will cause >> many array recreations when the `Iterable` contains more than 8 elements. >> Furtherm

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection [v2]

2023-04-08 Thread Chen Liang
On Sun, 9 Apr 2023 02:28:37 GMT, Tingjun Yuan wrote: >> In the current implementation of `String.join(CharSequence, Iterable)`, the >> temp array `elems` is always initialized with a length of 8. It will cause >> many array recreations when the `Iterable` contains more than 8 elements. >> Furt

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread Tingjun Yuan
On Fri, 7 Apr 2023 08:27:18 GMT, Tingjun Yuan wrote: > In the current implementation of `String.join(CharSequence, Iterable)`, the > temp array `elems` is always initialized with a length of 8. It will cause > many array recreations when the `Iterable` contains more than 8 elements. > Furtherm

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection [v2]

2023-04-08 Thread Tingjun Yuan
> In the current implementation of `String.join(CharSequence, Iterable)`, the > temp array `elems` is always initialized with a length of 8. It will cause > many array recreations when the `Iterable` contains more than 8 elements. > Furthermore, it's very common that an `Iterable` is also a `Col

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread jmehrens
On Fri, 7 Apr 2023 08:27:18 GMT, Tingjun Yuan wrote: > In the current implementation of `String.join(CharSequence, Iterable)`, the > temp array `elems` is always initialized with a length of 8. It will cause > many array recreations when the `Iterable` contains more than 8 elements. > Furtherm

Integrated: 6441827: Documentation mentions nonexistent NullReferenceException

2023-04-08 Thread Jaikiran Pai
On Sat, 8 Apr 2023 05:37:00 GMT, Jaikiran Pai wrote: > Can I please get a review of this doc only change which fixes a trivial typo > in the documentation of `ObjectOutputStream.replaceObject()` method, as noted > in https://bugs.openjdk.org/browse/JDK-6441827? This pull request has now been i

Re: RFR: 6441827: Documentation mentions nonexistent NullReferenceException [v2]

2023-04-08 Thread Jaikiran Pai
On Sat, 8 Apr 2023 13:00:40 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc only change which fixes a trivial typo >> in the documentation of `ObjectOutputStream.replaceObject()` method, as >> noted in https://bugs.openjdk.org/browse/JDK-6441827? > > Jaikiran Pai has updated t

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread Tingjun Yuan
On Sat, 8 Apr 2023 23:18:04 GMT, Chen Liang wrote: >> In the current implementation of `String.join(CharSequence, Iterable)`, the >> temp array `elems` is always initialized with a length of 8. It will cause >> many array recreations when the `Iterable` contains more than 8 elements. >> Furthe

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread Chen Liang
On Fri, 7 Apr 2023 08:27:18 GMT, Tingjun Yuan wrote: > In the current implementation of `String.join(CharSequence, Iterable)`, the > temp array `elems` is always initialized with a length of 8. It will cause > many array recreations when the `Iterable` contains more than 8 elements. > Furtherm

Re: RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread Jim Laskey
On Fri, 7 Apr 2023 08:27:18 GMT, Tingjun Yuan wrote: > In the current implementation of `String.join(CharSequence, Iterable)`, the > temp array `elems` is always initialized with a length of 8. It will cause > many array recreations when the `Iterable` contains more than 8 elements. > Furtherm

RFR: 8305774: String.join(CharSequence, Iterable) can be optimized if Iterable is a Collection

2023-04-08 Thread Tingjun Yuan
In the current implementation of `String.join(CharSequence, Iterable)`, the temp array `elems` is always initialized with a length of 8. It will cause many array recreations when the `Iterable` contains more than 8 elements. Furthermore, it's very common that an `Iterable` is also a `Collection`

Re: RFR: 6441827: Documentation mentions nonexistent NullReferenceException [v2]

2023-04-08 Thread Iris Clark
On Sat, 8 Apr 2023 13:00:40 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc only change which fixes a trivial typo >> in the documentation of `ObjectOutputStream.replaceObject()` method, as >> noted in https://bugs.openjdk.org/browse/JDK-6441827? > > Jaikiran Pai has updated t

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v9]

2023-04-08 Thread Roger Riggs
> Define an internal jdk.internal.util.Architecture enumeration and static > methods to replace uses of the system property `os.arch`. > The enumeration values are defined to match those used in the build. > The initial values are: `X64, X86, IA64, ARM, AARCH64, RISCV64, S390X, > PPC64LE` > Note

Re: RFR: 8305758: Update the JAR tool man page to indicate -i/--generate-file is deprecated

2023-04-08 Thread Alan Bateman
On Sat, 8 Apr 2023 10:33:48 GMT, Lance Andersen wrote: > Hi all, > > Please review this MR which updates the jar man page to to indicate that > --generate-index/-I are deprecated and may be removed in a future release > > Support for JAR Index is being removed via JDK-8302819. src/jdk.jartoo

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v56]

2023-04-08 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation a

RFE: SequenceInputStream - Consider new issue for PR #11718

2023-04-08 Thread Benjamin Marwell
Dear Core-Devs, There was a PR created for an enhancement of SequenceInputStream [1] by Romain Manni-Buceau. Description by Romain: > enumeration(list) will create an enumeration, a list and an iterator whereas > the impl only requires an iterator > this PR drops the enumeration wrapper for bin

Re: RFR: 8305748: Clarify reentrant behavior of close() in FileInputStream, FileOutputStream, and RandomAccessFile [v2]

2023-04-08 Thread Archie L . Cobbs
On Fri, 7 Apr 2023 17:56:30 GMT, Alan Bateman wrote: >> Archie L. Cobbs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Apply Javadoc improvements suggested in review. > > src/java.base/share/classes/java/io/FileInputStream.java line 503

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v55]

2023-04-08 Thread Jim Laskey
> Enhance the Java programming language with string templates, which are > similar to string literals but contain embedded expressions. A string > template is interpreted at run time by replacing each expression with the > result of evaluating that expression, possibly after further validation a

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v54]

2023-04-08 Thread Jim Laskey
On Fri, 7 Apr 2023 09:32:59 GMT, ExE Boss wrote: >> Jim Laskey has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Recommended changes > > src/java.base/share/classes/java/lang/StringConcatHelper.java line 364: > >> 362: try { >> 36

Re: RFR: 8305758: Update the JAR tool man page to indicate -i/--generate-file is deprecated

2023-04-08 Thread Lance Andersen
On Sat, 8 Apr 2023 11:53:50 GMT, Eirik Bjorsnos wrote: > The JBS issue name should be updated to use a lowercase `-i` and this PR's > title should be updated to match the JBS title. Lack of coffee and doing this before 7am this morning is my only excuse > Is the `compiler` label appropriate f

Re: RFR: 8304717: Declaration aliasing between boolean and jboolean is wrong [v4]

2023-04-08 Thread Julian Waters
> A couple of spots wrongly refer to boolean and jboolean as the same thing. > While this does still compile thanks to a happy accident and implicit > conversions, they are not the same at all, and should be fixed before a > future compiler error happens if their declarations are touched Julian

Re: RFR: 8304717: Declaration aliasing between boolean and jboolean is wrong [v3]

2023-04-08 Thread Julian Waters
On Fri, 31 Mar 2023 05:57:01 GMT, Julian Waters wrote: >> A couple of spots wrongly refer to boolean and jboolean as the same thing. >> While this does still compile thanks to a happy accident and implicit >> conversions, they are not the same at all, and should be fixed before a >> future com

Re: RFR: 8305341: Alignment should be enforced by alignas instead of compiler specific attributes [v3]

2023-04-08 Thread Julian Waters
> C11 has been stable for a long time on all platforms, so native code can use > the standard alignas operator for alignment requirements Julian Waters has updated the pull request incrementally with one additional commit since the last revision: Semicolon - Changes: - all: ht

Re: RFR: 6441827: Documentation mentions nonexistent NullReferenceException [v2]

2023-04-08 Thread Jaikiran Pai
On Sat, 8 Apr 2023 08:24:54 GMT, ExE Boss wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @link instead of @code > > src/java.base/share/classes/java/io/ObjectOutputStream.java line 588: > >> 586: * >> 587:

Re: RFR: 6441827: Documentation mentions nonexistent NullReferenceException [v2]

2023-04-08 Thread Jaikiran Pai
> Can I please get a review of this doc only change which fixes a trivial typo > in the documentation of `ObjectOutputStream.replaceObject()` method, as noted > in https://bugs.openjdk.org/browse/JDK-6441827? Jaikiran Pai has updated the pull request incrementally with one additional commit sin

Re: RFR: 8305758: Update the man page to indicate -i/--generate-file is deprecated

2023-04-08 Thread Eirik Bjorsnos
On Sat, 8 Apr 2023 10:33:48 GMT, Lance Andersen wrote: > Hi all, > > Please review this MR which updates the jar man page to to indicate that > --generate-index/-I are deprecated and may be removed in a future release > > Support for JAR Index is being removed via JDK-8302819. Is the `compil

Re: RFR: 8305758: Update the man page to indicate -i/--generate-file is deprecated

2023-04-08 Thread Eirik Bjorsnos
On Sat, 8 Apr 2023 10:33:48 GMT, Lance Andersen wrote: > Hi all, > > Please review this MR which updates the jar man page to to indicate that > --generate-index/-I are deprecated and may be removed in a future release > > Support for JAR Index is being removed via JDK-8302819. The JBS issue

RFR: 8305758: Update the man page to indicate -i/--generate-file is deprecated

2023-04-08 Thread Lance Andersen
Hi all, Please review this MR which updates the jar man page to to indicate that --generate-index/-I are deprecated and may be removed in a future release Support for JAR Index is being removed via JDK-8302819. - Commit messages: - Update the man page to indicate -i/--generate-fi

Re: RFR: 6441827: Documentation mentions nonexistent NullReferenceException

2023-04-08 Thread ExE Boss
On Sat, 8 Apr 2023 05:37:00 GMT, Jaikiran Pai wrote: > Can I please get a review of this doc only change which fixes a trivial typo > in the documentation of `ObjectOutputStream.replaceObject()` method, as noted > in https://bugs.openjdk.org/browse/JDK-6441827? src/java.base/share/classes/java

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v8]

2023-04-08 Thread ExE Boss
On Fri, 7 Apr 2023 21:13:03 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64, X8

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v7]

2023-04-08 Thread Thomas Stuefe
On Fri, 7 Apr 2023 21:15:11 GMT, Roger Riggs wrote: > Refactored the way that build time architecture values are mapped to the > Architecture enum. Thank you for this, Roger. - PR Review Comment: https://git.openjdk.org/jdk/pull/13357#discussion_r1161075537