Re: RFR: 8359732: Make standard i/o encoding related system properties `StaticProperty` [v4]

2025-06-20 Thread Roger Riggs
On Fri, 20 Jun 2025 18:44:47 GMT, Naoto Sato wrote: >> Refactored the internal handling of `stdin/out/err.encoding` to allow >> setting them only via command-line options by converting them into >> `StaticProperty`. This change prevents unexpected behavior caused by >> applications modifying t

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-20 Thread Roger Riggs
On Fri, 20 Jun 2025 15:50:53 GMT, Chen Liang wrote: >> As this PR explicitly targets performance and as the aim of this method is >> to keep **all** content in-memory anyways, I wonder if it would be >> acceptable and even faster to pre-allocate `new >> StringBuilder(TRANSFER_BUFFER_SIZE)`? In

Re: RFR: 8359732: Make standard i/o encoding related system properties `StaticProperty` [v3]

2025-06-20 Thread Roger Riggs
On Wed, 18 Jun 2025 18:24:43 GMT, Naoto Sato wrote: >> Refactored the internal handling of `stdin/out/err.encoding` to allow >> setting them only via command-line options by converting them into >> `StaticProperty`. This change prevents unexpected behavior caused by >> applications modifying t

Re: RFR: 8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils

2025-06-20 Thread Roger Riggs
On Mon, 16 Jun 2025 22:49:02 GMT, Vladimir Petko wrote: > To accommodate systems like Ubuntu 25.10 that use Rust coreutils, this PR > updates tests that previously assumed BusyBox was the only environment to use > symlinks for core utilities. > > Changes: > - `java/lang/ProcessBuilder/Basic.

RFR: 8354872: Clarify java.lang.Process resource cleanup

2025-06-18 Thread Roger Riggs
Improve the documentation of Process use of system resources. Describe the implementation closing streams when no longer referenced. Clarify the interactions between inputStream and inputReader and errorStream and errorReader. Add advice and example using try-with-resources to open and close stre

Re: RFR: 8359732: Make standard i/o encoding related system properties `StaticProperty`

2025-06-18 Thread Roger Riggs
On Wed, 18 Jun 2025 07:50:31 GMT, Alan Bateman wrote: >> Refactored the internal handling of `stdin/out/err.encoding` to allow >> setting them only via command-line options by converting them into >> `StaticProperty`. This change prevents unexpected behavior caused by >> applications modifying

Re: RFR: 8359732: Make standard i/o encoding related system properties `StaticProperty`

2025-06-18 Thread Roger Riggs
On Tue, 17 Jun 2025 20:16:05 GMT, Naoto Sato wrote: > Refactored the internal handling of `stdin/out/err.encoding` to allow setting > them only via command-line options by converting them into `StaticProperty`. > This change prevents unexpected behavior caused by applications modifying > these

Re: RFR: 8359830: Incorrect os.version reported on macOS Tahoe 26 (Beta)

2025-06-18 Thread Roger Riggs
On Wed, 18 Jun 2025 06:01:43 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to address the issue > noted in https://bugs.openjdk.org/browse/JDK-8359830? > > macOS operating system's newer version 26 (currently in Beta) is reported as > a 16 by older versions

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-17 Thread Roger Riggs
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

Re: RFR: 8359735: [Ubuntu 25.10] java/lang/ProcessBuilder/Basic.java, java/lang/ProcessHandle/InfoTest.java fail due to rust-coreutils

2025-06-17 Thread Roger Riggs
On Mon, 16 Jun 2025 22:49:02 GMT, Vladimir Petko wrote: > To accommodate systems like Ubuntu 25.10 that use Rust coreutils, this PR > updates tests that previously assumed BusyBox was the only environment to use > symlinks for core utilities. > > Changes: > - `java/lang/ProcessBuilder/Basic.

Re: RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close() [v5]

2025-06-17 Thread Roger Riggs
On Tue, 17 Jun 2025 05:56:15 GMT, Thomas Stuefe wrote: >> Hi, please consider the following patch. >> >> This patch replaces the existing close-file-descriptors-logic we follow >> before exec'ing a target binary: instead of explicitly closing the file >> descriptors, we mark them as CLOEXEC. T

Re: RFR: 8357089: Remove VFORK launch mechanism from Process implementation (linux)

2025-06-16 Thread Roger Riggs
On Thu, 12 Jun 2025 04:11:15 GMT, Thomas Stuefe wrote: > (for JDK 26) > > Note: This PR is a continuation of the old PR here: > https://github.com/openjdk/jdk/pull/25260; had to close the old one since I > had Skara problems after the JDK25 split-off. > > See the companion CSR (https://bugs.o

Re: RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close() [v4]

2025-06-16 Thread Roger Riggs
On Fri, 13 Jun 2025 06:40:29 GMT, Thomas Stuefe wrote: >> Hi, please consider the following patch. >> >> This patch replaces the existing close-file-descriptors-logic we follow >> before exec'ing a target binary: instead of explicitly closing the file >> descriptors, we mark them as CLOEXEC. T

Re: RFR: 8294226: Document missing UnsupportedTemporalTypeException

2025-06-16 Thread Roger Riggs
On Mon, 16 Jun 2025 16:36:43 GMT, Gautham Krishnan wrote: > Some methods in the java.time.chrono interfaces—ChronoLocalDate, > ChronoLocalDateTime, and ChronoZonedDateTime—override methods from the > java.time.temporal.Temporal interface that are documented to throw > UnsupportedTemporalTypeE

Re: RFR: 8357823: Changes in StringBuilder (JDK-8351443) caused a 1-3% regression in biojava [v2]

2025-06-11 Thread Roger Riggs
N1"; >assert count <= newCapacity : "count exceeds new capacity"; Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Microbenchmark java.lang.StringBuilders is modified to not re-use existing StringBu

Re: RFR: 8357823: Changes in StringBuilder (JDK-8351443) caused a 1-3% regression in biojava

2025-06-11 Thread Roger Riggs
On Mon, 2 Jun 2025 23:32:39 GMT, Shaojin Wen wrote: > The performance figures under x64 show that the performance of > StringBuilders.appendWithIntLatin1 scenario drops by about 6%, but the > performance of StringBuilders.appendWithLongLatin1 does not drop. All of the JMH tests for StringBuild

Re: RFR: 8359067: Fix typo in DelayScheduler.java

2025-06-10 Thread Roger Riggs
On Sun, 8 Jun 2025 09:07:11 GMT, He-Pin(kerr) wrote: > Rename auxilliary to auxiliary Marked as reviewed by rriggs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/25685#pullrequestreview-2913582933

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v4]

2025-05-30 Thread Roger Riggs
On Fri, 30 May 2025 10:48:20 GMT, kieran-farrell wrote: >> With the recent approval of UUIDv7 >> (https://datatracker.ietf.org/doc/rfc9562/), this PR aims to add a new >> static method UUID.timestampUUID() which constructs and returns a UUID in >> support of the new time generated UUID version

RFR: 8357823: Changes in StringBuilder (JDK-8351443) caused a 1-3% regression in biojava

2025-05-30 Thread Roger Riggs
Comment out assertions added in JDK-8351443 from AbstractStringBuilder.ensureCapacityNewCoder that increase the codesize, preventing some inlining, and reducing performance assert coder == newCoder || newCoder == UTF16 : "bad new coder UTF16 -> LATIN1"; assert count <= newCapacity

Re: RFR: 8357683: (process) SIGQUIT still blocked after JDK-8234262 with jdk.lang.Process.launchMechanism=FORK or VFORK [v2]

2025-05-29 Thread Roger Riggs
On Sat, 24 May 2025 10:15:44 GMT, Thomas Stuefe wrote: >> See bug description. We now unblock all signals in both FORK and POSIX_SPAWN >> launch modes. This fixes the problem and makes the behavior consistent >> across these two modes. >> >> I left the VFORK mode alone since I believe the sign

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v3]

2025-05-29 Thread Roger Riggs
On Thu, 29 May 2025 17:05:23 GMT, kieran-farrell wrote: >> We don't have a reliable sub-microsecond source across platforms, so can >> only be confident using random numbers for the low order bits. (and I don't >> expect a higher resolution monotonic clock to be available anytime soon). >> >>

Re: RFR: 8357683: (process) SIGQUIT still blocked after JDK-8234262 with jdk.lang.Process.launchMechanism=FORK or VFORK [v2]

2025-05-29 Thread Roger Riggs
On Sat, 24 May 2025 10:15:44 GMT, Thomas Stuefe wrote: >> See bug description. We now unblock all signals in both FORK and POSIX_SPAWN >> launch modes. This fixes the problem and makes the behavior consistent >> across these two modes. >> >> I left the VFORK mode alone since I believe the sign

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v3]

2025-05-28 Thread Roger Riggs
On Wed, 28 May 2025 17:11:31 GMT, kieran-farrell wrote: >> The `timestamp` method may mislead an app developer thinking its the time >> from the version 7 timestamp. >> The first-line comment might make it more obvious if it says: >> `The timestamp value associated with a version 1 UUID.` >> >>

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v26]

2025-05-28 Thread Roger Riggs
On Fri, 23 May 2025 18:44:42 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: "input reader specific" -> "reader specific"

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v3]

2025-05-27 Thread Roger Riggs
On Tue, 27 May 2025 21:44:32 GMT, Roger Riggs wrote: >> spec updated in class javadoc to RFC 9562 which obsolete RFC 4122, @spec tag >> also added above the method. > > I'd say "create" instead of "retrieve" in the first line comment. (Though > t

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v3]

2025-05-27 Thread Roger Riggs
On Tue, 20 May 2025 12:00:06 GMT, kieran-farrell wrote: >> src/java.base/share/classes/java/util/UUID.java line 195: >> >>> 193: * >>> 194: * @return A {@code UUID} generated from the current system time >>> 195: */ >> >> Seems like there should be a reference to the RFC somewher

Re: RFR: 8334742: Change java.time month/day field types to 'byte' [v2]

2025-05-27 Thread Roger Riggs
On Wed, 30 Apr 2025 20:38:59 GMT, Gautham Krishnan wrote: >> In the following classes, month and day values are stored in fields of type >> 'int' or 'short'. The range of allowed values is small enough that the type >> can be 'byte' instead. >> >> java.time.YearMonth >> java.time.MonthDay >> j

Re: RFR: 8357681: Fixed the DigitList::toString method causing incorrect results during debugging

2025-05-27 Thread Roger Riggs
On Tue, 27 May 2025 19:44:55 GMT, Shaojin Wen wrote: > To test this concurrency problem, we need to build a concurrent competition > test, which is not a simple task, so I did not add it. The label `noreg-hard` would be appropriate to indicate a test was not created due to difficulty. That lab

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v5]

2025-05-27 Thread Roger Riggs
On Sat, 24 May 2025 07:34:39 GMT, Tagir F. Valeev wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/max a

Re: RFR: 8357597: Proxy.getInvocationHandler throws NullPointerException instead of IllegalArgumentException for null [v2]

2025-05-27 Thread Roger Riggs
On Mon, 26 May 2025 15:48:10 GMT, Steffen Nießing wrote: >> `Proxy#getInvocationHandler(Object)` throws a `NullPointerException` if the >> specified argument is `null`. This PR adds the missing `throws` declaration >> for the NPE. > > Steffen Nießing has updated the pull request incrementally w

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v4]

2025-05-23 Thread Roger Riggs
On Fri, 23 May 2025 12:28:36 GMT, Tagir F. Valeev wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/max a

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v7]

2025-05-23 Thread Roger Riggs
On Wed, 21 May 2025 21:31:16 GMT, Chen Liang wrote: >> In offline discussion, we noted that the documentation on this annotation >> does not recommend minimizing the intrinsified section and moving whatever >> can be done in Java to Java; thus I prepared this documentation update, to >> shrink

Re: RFR: 8357597: Proxy.getInvocationHandler throws NullPointerException instead of IllegalArgumentException for null

2025-05-23 Thread Roger Riggs
On Fri, 23 May 2025 16:05:08 GMT, Steffen Nießing wrote: > `Proxy#getInvocationHandler(Object)` throws a `NullPointerException` if the > specified argument is `null`. This PR adds the missing `throws` declaration > for the NPE. looks fine, will review the csr when its drafted. -

Re: RFR: 8357178: Simplify Class::componentType [v2]

2025-05-23 Thread Roger Riggs
On Mon, 19 May 2025 00:22:08 GMT, Chen Liang wrote: >> `isArray` and null return is now redundant when `componentType` is changed >> to an explicit field. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > For parity with MT.de

Re: RFR: 8357081: Removed unused methods of HexDigits [v2]

2025-05-23 Thread Roger Riggs
On Fri, 23 May 2025 02:03:48 GMT, Shaojin Wen wrote: >> In HexDigits, getCharsLatin1 and getCharsUTF16 are no longer used, so remove >> these methods > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains two commits: > >

Re: RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close()

2025-05-22 Thread Roger Riggs
On Mon, 19 May 2025 12:23:07 GMT, Thomas Stuefe wrote: > Hi, please consider the following patch. > > This patch replaces the existing close-file-descriptors-logic we follow > before exec'ing a target binary: instead of explicitly closing the file > descriptors, we mark them as CLOEXEC. That s

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v2]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 09:09:15 GMT, Tagir F. Valeev wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/max a

Re: RFR: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 20:56:31 GMT, Volkan Yazici wrote: > There are several locations in the JDK source where `System.in` and > `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the > default charset. As recommended by the recently merged > [JDK-8356420](https://bugs.open

Re: RFR: 8355223: Improve documentation on @IntrinsicCandidate [v6]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 21:28:07 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java >> line 90: >> >>> 88: * intrinsic.) For example, the documentation can simply say that the >>> result is >>> 89: * undefined if a race happens. However, ra

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v25]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 19:18:03 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the m

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v8]

2025-05-21 Thread Roger Riggs
On Wed, 21 May 2025 00:57:30 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8210549: Runtime.exec: in closeDescriptors(), use FD_CLOEXEC instead of close()

2025-05-21 Thread Roger Riggs
On Mon, 19 May 2025 12:23:07 GMT, Thomas Stuefe wrote: > Hi, please consider the following patch. > > This patch replaces the existing close-file-descriptors-logic we follow > before exec'ing a target binary: instead of explicitly closing the file > descriptors, we mark them as CLOEXEC. That s

Re: RFR: 8356904: Skip jdk/test/lib/process/TestNativeProcessBuilder on static-jdk [v2]

2025-05-21 Thread Roger Riggs
On Wed, 14 May 2025 15:44:08 GMT, Jiangli Zhou wrote: >> Please review this PR for skipping >> jdk/test/lib/process/TestNativeProcessBuilder on static-jdk. Duplicating the >> context from https://bugs.openjdk.org/browse/JDK-8356904 description: >> >> jdk/test/lib/process/TestNativeProcessBuild

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v6]

2025-05-20 Thread Roger Riggs
On Mon, 19 May 2025 23:53:07 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > >

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v3]

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 13:56:42 GMT, kieran-farrell wrote: >>> Can the sub-microsecond value just be truncated and avoid the expensive >>> divide operation?' >> >> method 3 of secion 6.2 of >> https://www.rfc-editor.org/rfc/rfc9562.html#name-monotonicity-and-counters >> states >> >>> start wit

Re: RFR: 8347027: String replaceAll with Function

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 16:59:10 GMT, kieran-farrell wrote: > New API to the String.java class - replaceAllMapped(String, > Function) that allows regex based replacement via a user > defined function allowing dynamic replacemnt based on the match. It delegates > to the already existing Pattern.mat

Re: RFR: 8347027: String replaceAll with Function

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 16:59:10 GMT, kieran-farrell wrote: > New API to the String.java class - replaceAllMapped(String, > Function) that allows regex based replacement via a user > defined function allowing dynamic replacemnt based on the match. It delegates > to the already existing Pattern.mat

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-05-20 Thread Roger Riggs
On Tue, 20 May 2025 09:32:08 GMT, Kim Barrett wrote: >> src/java.base/share/classes/java/nio/Bits.java line 170: >> >>> 168: // without it that test likely fails. Since failure here >>> 169: // ends in OOME, there's no need to hurry. >>> 170: for (int sleeps

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-05-19 Thread Roger Riggs
On Mon, 19 May 2025 18:40:56 GMT, ExE Boss wrote: >> Kim Barrett has updated the pull request incrementally with one additional >> commit since the last revision: >> >> move jdk.internal.nio.Cleaner to sun.nio > > src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 209: >

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-05-19 Thread Roger Riggs
On Sun, 18 May 2025 20:55:48 GMT, Kim Barrett wrote: >> This change makes java.nio no longer use jdk.internal.ref.Cleaner to manage >> native memory for Direct-X-Buffers. Instead it uses bespoke PhantomReferences >> and a dedicated ReferenceQueue. This differs from PR 22165, which proposed to >>

Re: RFR: 8357063: Document preconditions for DecimalDigits methods [v4]

2025-05-19 Thread Roger Riggs
On Fri, 16 May 2025 16:10:29 GMT, Shaojin Wen wrote: >> Similar to PR #24982 >> Document preconditions on certain DecimalDigits methods that use operations >> either unsafe and/or without range checks. > > Shaojin Wen has updated the pull request incrementally with one additional > commit sinc

Re: RFR: 8353741: Eliminate table lookup in UUID.toString [v3]

2025-05-19 Thread Roger Riggs
On Sat, 5 Apr 2025 05:30:25 GMT, Shaojin Wen wrote: >> Improve the performance of UUID::toString by using Long.expand and SWAR >> (SIMD within a register) instead of table lookup. Eliminating the table >> lookup can also avoid the performance degradation problem when the cache >> misses. > > S

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562

2025-05-19 Thread Roger Riggs
On Mon, 19 May 2025 13:33:51 GMT, kieran-farrell wrote: > With the recent approval of UUIDv7 > (https://datatracker.ietf.org/doc/rfc9562/), this PR aims to add a new static > method UUID.timestampUUID() which constructs and returns a UUID in support of > the new time generated UUID version. >

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface

2025-05-19 Thread Roger Riggs
On Mon, 19 May 2025 07:25:17 GMT, Tagir F. Valeev wrote: > Implementation of Comparator.min and Comparator.max methods. Preliminary > discussion is in this thread: > https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html > The specification is mostly composed of Math.min/max and C

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux) [v2]

2025-05-19 Thread Roger Riggs
On Mon, 19 May 2025 16:59:06 GMT, Thomas Stuefe wrote: >> For the ratio behind this please see the companion CSR: >> https://bugs.openjdk.org/browse/JDK-8357180. >> >> We plan to deprecate this in JDK 25 and to remove it in JDK 26. >> >> This patch just writes a deprecation message to stderr:

Re: RFR: 8357179: Deprecate VFORK launch mechanism from Process implementation (linux)

2025-05-19 Thread Roger Riggs
On Sat, 17 May 2025 06:49:37 GMT, Thomas Stuefe wrote: > For the ratio behind this please see the companion CSR: > https://bugs.openjdk.org/browse/JDK-8357180. > > We plan to deprecate this in JDK 25 and to remove it in JDK 26. > > This patch just writes a deprecation message to stderr: > >

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-16 Thread Roger Riggs
On Thu, 15 May 2025 20:34:13 GMT, Brian Burkhalter wrote: >> @stuart-marks Sorry, didn't want to pull you in here, that's why I said, I >> am just *paraphrasing*. >> >> That is correct, it is a different case, but the *final effect* for the >> caller is the same: If he needs to now whether a c

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-16 Thread Roger Riggs
On Wed, 14 May 2025 18:16:22 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: Replace getChars in previous commit with subS

Re: RFR: 8356993: ArrayDeque should use Arrays.fill() instead of for() loops

2025-05-15 Thread Roger Riggs
On Wed, 14 May 2025 19:37:37 GMT, Archie Cobbs wrote: > Please review this small performance tweak `ArrayDeque`. > > `ArrayDeque` has an invariant in which any unused elements in the array must > be null. In a couple of places, the code is setting contiguous ranges of > elements to null using

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v22]

2025-05-14 Thread Roger Riggs
On Wed, 14 May 2025 20:36:47 GMT, Markus KARG wrote: >> Actually I am working on exact these optimizations right now and do not like >> the idea that I have to file another JBS and PR just for a single code line. >> As `subSequence` typically *does* a copy (to not hold the original full text >

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Roger Riggs
On Wed, 14 May 2025 19:41:30 GMT, Markus KARG wrote: >> A "pure" `CharSequence` *is* immutable, as it does not have mutation >> methods. Also, why *should* the result be immutable? If someone wants to >> return a `StringBuilder` for example (for whatever intent), why shouldn't he >> allowed to

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]

2025-05-14 Thread Roger Riggs
On Wed, 14 May 2025 18:09:26 GMT, Johannes Döbler wrote: >> BTW, it will *already* throw OOME as-is, *because* it returns a `String` >> even if the Reader is attached to an infinite source. > > Maybe a good idea at this point if @mkarg could provide an example of server > code benefitting from

Re: RFC: 8356679: Using CharSequence::getChars internally

2025-05-14 Thread Roger Riggs
e in? -Markus Am 13.05.2025 um 15:10 schrieb Roger Riggs: Hi Markus, A main point was to avoid trying to do everything at once. The PR comments become hard to follow and intermingled and it takes longer to get agreement because of the thrash in the PR. Roger On 5/13/25 5:05 AM, Markus KARG wrot

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v18]

2025-05-13 Thread Roger Riggs
or readAllLines. > >Co-authored-by: Roger Riggs > - Update src/java.base/share/classes/java/io/Reader.java > >8354724: Apply suggested changes for readAllAsString. > >Co-authored-by: Roger Riggs > - 8354724: Revert BufferedReader; simplif

Re: RFR: 8352533: Report useful IOExceptions when jspawnhelper fails [v5]

2025-05-13 Thread Roger Riggs
On Tue, 13 May 2025 10:30:14 GMT, Aleksey Shipilev wrote: >> When jspawnhelper fails for whatever reason, but more prominently due to >> [JDK-8325621](https://bugs.openjdk.org/browse/JDK-8325621), it will report >> the errors into stdout, but not to the relevant `IOException`. So, if the >> ap

Re: RFC: 8356679: Using CharSequence::getChars internally

2025-05-13 Thread Roger Riggs
how to code would change". In the worst case, let's drop it if we see that it is actually a bad thing. -Markus Am 12.05.2025 um 20:18 schrieb Roger Riggs: Hi Markus, On the surface, its looks constructive. I suspect that many of these cases will turn into discussions about the right

Integrated: 8356695: java/lang/StringBuilder/HugeCapacity.java failing with OOME

2025-05-12 Thread Roger Riggs
On Mon, 12 May 2025 15:53:42 GMT, Roger Riggs wrote: > The failure of the new StringBuilder HugeCapacity test testHugePlus is > intermittent with some GC's. > It could be reliably reproduced with the serialGC and parallelGC's. > > Raise the memory limit from 6G to

Re: RFR: 8355177: Speed up StringBuilder::append(char[]) via Unsafe::copyMemory [v4]

2025-05-12 Thread Roger Riggs
On Fri, 2 May 2025 18:11:54 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/java/lang/StringUTF16.java line 1322: >> >>> 1320: val, >>> 1321: Unsafe.ARRAY_BYTE_BASE_OFFSET + ((long) index << 1), >>> 1322: ((long) (end - off)) << 1); >> >> T

Re: RFC: 8356679: Using CharSequence::getChars internally

2025-05-12 Thread Roger Riggs
Hi Markus, On the surface, its looks constructive. I suspect that many of these cases will turn into discussions about the right/best/better way to buffer the characters. The getChars method only helps when extracting to a char array, many of the current implementations create strings as the in

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v5]

2025-05-12 Thread Roger Riggs
On Mon, 12 May 2025 10:17:46 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request incrementally with two additional > commits since the last revisi

RFR: 8356695: java/lang/StringBuilder/HugeCapacity.java failing with OOME

2025-05-12 Thread Roger Riggs
The failure of the new StringBuilder HugeCapacity test testHugePlus is intermittent with some GC's. It could be reliably reproduced with the serialGC and parallelGC's. Raise the memory limit from 6G to 8G to accommodate the new test with all GCs. - Commit messages: - 8356695: java/

Re: RFR: 8356694: Removed unused subclass audits in ObjectInput/OutputStream

2025-05-12 Thread Roger Riggs
On Mon, 12 May 2025 02:18:05 GMT, Chen Liang wrote: > These two subclass audits in ObjectInputStream and ObjectOutputStream were > only used when security managers are present, which is no longer the case in > releases 24 and newer. Thus, we can remove these two redundant `ClassValue` > and th

Integrated: 8351443: Improve robustness of StringBuilder

2025-05-09 Thread Roger Riggs
On Wed, 30 Apr 2025 14:12:36 GMT, Roger Riggs wrote: > Refactor AbstractStringBuilder to maintain consistency among count, coder, > and value buffers while the buffer capacity is being expanded and/or inflated > from Latin1 to UTF16 representations. > The refactoring pattern is

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: 8354724: Methods in java.io.Reader to read all characters and all lines [v16]

2025-05-09 Thread Roger Riggs
On Tue, 6 May 2025 15:43:07 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: Revert BufferedReader; simplify Reader changes

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-09 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Rem

Re: RFR: 8351443: Improve robustness of StringBuilder [v8]

2025-05-09 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with two additional commits since the last revision:

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-09 Thread Roger Riggs
On Tue, 6 May 2025 16:18:11 GMT, Chen Liang wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Apply reviewer suggestions for typos, javadoc, and copyright dates. > > src/jav

Re: RFR: 8351443: Improve robustness of StringBuilder [v7]

2025-05-08 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add an

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v12]

2025-05-07 Thread Roger Riggs
On Tue, 6 May 2025 20:52:34 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` in

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 15:19:09 GMT, Johannes Graham wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refactor to consistently use `isLatin1(coder)` within >> AbstractStringBuilder. > &

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 13:59:40 GMT, Jaikiran Pai wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refactor to consistently use `isLatin1(coder)` within >> AbstractStringBuilder. > &

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Apply

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 13:03:37 GMT, Jaikiran Pai wrote: > I see that in the proposed changes, we are now using the same names for these > local variables and method parameters as the field names. Would using > different names for these local variables be better? To avoid shadowing the > field nam

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-06 Thread Roger Riggs
On Tue, 6 May 2025 01:38:21 GMT, Jaikiran Pai wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Refactor to consistently use `isLatin1(coder)` within >> AbstractStringBuilder. > &

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v5]

2025-05-06 Thread Roger Riggs
On Mon, 5 May 2025 17:29:33 GMT, Raffaello Giulietti wrote: >> A fix to throw `OutOfMemoryError`, as done in releases ≤ 23. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Increased min heap size to 8G. Looks good,

Re: RFR: 8353489: Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java [v3]

2025-05-05 Thread Roger Riggs
On Sat, 3 May 2025 13:02:34 GMT, Oleksii Sylichenko wrote: >> This PR proposes three improvements to the `Basic.java` test: >> >> 1. Increase Timeout >>- The current timeout is insufficient when running the test in IntelliJ >> IDEA. >>- I propose increasing it by one minute. >>- The

Integrated: 8354334: Remove @ValueBased from ProcessHandle

2025-05-05 Thread Roger Riggs
On Thu, 1 May 2025 13:36:13 GMT, Roger Riggs wrote: > Remove internal ValueBased annotation from the ProcessHandle interface > declaration. > The implementation remains value based as described in the javadoc. > Remove unnecessary "public" keyword in interfaces and clean

Re: RFR: 8351443: Improve robustness of StringBuilder [v3]

2025-05-05 Thread Roger Riggs
On Fri, 2 May 2025 17:49:20 GMT, Shaojin Wen wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Optimize StringUTF16.putCharsAt a bit. >> Fixup hotspot Helper of putCharsAt t

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Roger Riggs
On Mon, 5 May 2025 17:38:55 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/StringUTF16.java line 1531: >> >>> 1529: } >>> 1530: >>> 1531: public static void putCharsAt(byte[] value, int i, char c1, char >>> c2, char c3, char c4) { >> >> Hello Roger, can this (pre-exis

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Refactor

Re: RFR: 8351443: Improve robustness of StringBuilder [v4]

2025-05-05 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Appl

Re: RFR: 8353489: Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java

2025-05-02 Thread Roger Riggs
On Fri, 2 May 2025 21:52:46 GMT, Oleksii Sylichenko wrote: >> A bit more investigation and some trial and error. >> It appears that with `echo.`, cmd.com is searching for a file named "echo" >> and when it does not find it it reverts to the builtin. But it has already >> wasted time searching

Re: RFR: 8353489: Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java

2025-05-02 Thread Roger Riggs
On Fri, 2 May 2025 17:42:40 GMT, Roger Riggs wrote: >> No, `echo.` is not an executable, this is a command of the Windows Command >> Processor. >> >> See: >> https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo > > That soun

Re: RFR: 8353489: Increase timeout and improve Windows compatibility in test/jdk/java/lang/ProcessBuilder/Basic.java

2025-05-02 Thread Roger Riggs
On Thu, 1 May 2025 21:58:18 GMT, Oleksii Sylichenko wrote: >> Is `echo.` shorthand for `echo.exe`; if so, please change to the long form >> to make it clearer the echo program is being run. > > No, `echo.` is not an executable, this is a command of the Windows Command > Processor. > > See: >

Re: RFR: 8349176: Speed up Integer/Long.toString via StringConcatHelper::newArray [v3]

2025-05-02 Thread Roger Riggs
On Fri, 2 May 2025 03:55:24 GMT, Shaojin Wen wrote: >> The byte[] allocated in Integer/Long.toString is fully filled, so we can use >> StringConcatHelper::newArray to create byte[] to improve performance. > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a

Re: RFR: 8355177: Speed up StringBuilder::append(char[]) via UTF16::compress & Unsafe::copyMemory [v4]

2025-05-02 Thread Roger Riggs
On Fri, 2 May 2025 03:49:39 GMT, Shaojin Wen wrote: >> In BufferedReader.readLine and other similar scenarios, we need to use >> StringBuilder.append(char[]) to build the string. >> >> For these scenarios, we can use the intrinsic method StringUTF16.compress >> and Unsafe.copyMemory instead of

Re: RFR: 8351443: Improve robustness of StringBuilder [v3]

2025-05-02 Thread Roger Riggs
nflation to change the coder from LATIN1 to > UTF16 > - Inflation with the same capacity > > Added StressSBTest to exercise public instance methods of StringBuilder. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: O

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods

2025-05-02 Thread Roger Riggs
On Thu, 1 May 2025 05:33:29 GMT, Volkan Yazici wrote: > Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 314: > 312: * > 313: * WARNING

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

  1   2   3   4   5   6   7   8   9   10   >