Re: RFR: 8368178: Add specialization of SequencedCollection methods to standard list factories [v3]

2025-09-24 Thread Stuart Marks
On Tue, 23 Sep 2025 07:25:04 GMT, Tagir F. Valeev wrote: >> Please review this small change. If you have more ideas which classes may >> miss specializations of SequencedCollection methods, I can add them to this >> PR as well. > > Tagir F. Valeev has updated the pull request incrementally with

Re: RFR: 8368178: Add specialization of SequencedCollection methods to emptyList, singletonList and nCopies [v2]

2025-09-22 Thread Stuart Marks
On Mon, 22 Sep 2025 08:06:55 GMT, Tagir F. Valeev wrote: >> @amaembo `SequencedMap` already implements `Map`. :-) So, we could say: >> >> >> public static final SequencedMap emptyMap() { ... } >> >> >> An empty map could also "incidentally" implement `SequencedMap`. > > @minborg as JLS 13.4

Re: RFR: 8366261: Provide utility methods for sun.security.util.Password [v6]

2025-09-20 Thread Stuart Marks
On Mon, 8 Sep 2025 16:34:29 GMT, Naoto Sato wrote: >> Providing a couple of utility methods using the "built-in" `Console` >> implementation to support tools that require password input, such as >> `keytool`, ensuring they work even when std0ut is redirected. > > Naoto Sato has updated the pull

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

2025-09-18 Thread Stuart Marks
On Thu, 18 Sep 2025 22:34:52 GMT, Chen Liang wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add @implSpec > > src/java.base/share/classes/java/util/Comparator.java line 201: > >> 199: * @param o1 an a

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

2025-09-18 Thread Stuart Marks
On Sun, 3 Aug 2025 13:42:41 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 an

Re: [External] : Re: Excessive copying of Collection.toArray()

2025-09-11 Thread Stuart Marks
(This deserves a reply, but I've been distracted by a bunch of other stuff recently. I should be able to continue this conversation in a few days. Sorry for the delay.) s'marks

Re: RFR: 8366261: Provide utility methods for sun.security.util.Password [v7]

2025-09-09 Thread Stuart Marks
On Tue, 9 Sep 2025 17:10:10 GMT, Naoto Sato wrote: >> Providing a couple of utility methods using the "built-in" `Console` >> implementation to support tools that require password input, such as >> `keytool`, ensuring they work even when std0ut is redirected. > > Naoto Sato has updated the pull

Re: Excessive copying of Collection.toArray()

2025-09-07 Thread Stuart Marks
There have been previous attempts to reduce copying here and there, but they do suffer from the problems you have described. See https://github.com/openjdk/jdk/pull/12212 That's a valuable link. It touches on the same problem and potential solutions. It's a shame it was abandoned. This sup

Re: StableValue and non-deterministic iteration order

2025-09-05 Thread Stuart Marks
On 9/5/25 12:12 AM, Stephen Colebourne wrote: Back in March 2023 there was a discussion about the non-deterministic iteration order of Map.of() and friends: https://mail.openjdk.org/pipermail/core-libs-dev/2023-March/102865.html It feels like this discussion should be revisited now that we ha

Re: RFR: 8366261: Provide utility methods for sun.security.util.Password [v5]

2025-09-04 Thread Stuart Marks
On Tue, 2 Sep 2025 16:29:32 GMT, Naoto Sato wrote: >> Providing a couple of utility methods using the "built-in" `Console` >> implementation to support tools that require password input, such as >> `keytool`, ensuring they work even when std0ut is redirected. > > Naoto Sato has updated the pull

Re: Excessive copying of Collection.toArray()

2025-09-03 Thread Stuart Marks
Hi Shaun, You got pretty far with your analysis; congratulations! It would indeed be nice to avoid excess copying. The crux of the matter is, as you concluded, how one can know whether to trust the caller. As you surmised the "only trust ArrayList" policy is merely a stopgap. You already pro

Re: RFR: 8328821: Map.of() derived view collection mutators should throw UnsupportedOperationException [v13]

2025-09-02 Thread Stuart Marks
On Fri, 30 May 2025 03:59:37 GMT, Liam Miller-Cushon wrote: >> This change overrides mutator methods in the implementation returned by >> `Map.of().entrySet()` to throw `UnsupportedOperationException`. > > Liam Miller-Cushon has updated the pull request incrementally with one > additional commi

Re: [External] : Re: Q: List.of(E... elements) specification with regards to underlying array updates

2025-09-02 Thread Stuart Marks
On 9/2/25 5:00 AM, Eirik Bjørsnøs wrote: On Tue, Sep 2, 2025 at 1:46 PM Eirik Bjørsnøs wrote: Interestingly, List.copyOf [4] explicitly specifies that modifications to the given Collection are not reflected in the returned List. (Even when this may be inferred from the method name!). This p

Re: RFR: 8366261: Provide utility methods for sun.security.util.Password [v2]

2025-08-29 Thread Stuart Marks
On Thu, 28 Aug 2025 13:41:47 GMT, Chen Liang wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @Native annotated > > src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 117: > >> 115: return I

Re: RFR: 8366375: Collator example for SECONDARY uses wrong code point

2025-08-29 Thread Stuart Marks
On Fri, 29 Aug 2025 16:47:14 GMT, Naoto Sato wrote: > Minor documentation corrections in Collator Looks good, thanks. - Marked as reviewed by smarks (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/27007#pullrequestreview-3170383703

Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-08-21 Thread Stuart Marks
On Mon, 14 Jul 2025 20:23:25 GMT, Naoto Sato wrote: >> In prior JDK releases, `System.console()` could return a `Console` instance >> even when the JVM was not attached to an interactive terminal. This could >> lead to confusion, particularly when input was not from a keyboard or output >> was

Re: RFR: 8361972: Clarify the condition of System.console() about standard input/output [v4]

2025-08-21 Thread Stuart Marks
On Thu, 21 Aug 2025 00:37:59 GMT, Naoto Sato wrote: >> This accompanies the fix for >> [JDK-8361613](https://bugs.openjdk.org/browse/JDK-8361613), which restricts >> `System.console()` to return a `Console` instance only when both standard >> input and output are connected to a terminal. The c

Re: RFR: 8361972: Clarify the condition of System.console() about standard input/output [v3]

2025-08-20 Thread Stuart Marks
On Mon, 14 Jul 2025 20:58:56 GMT, Justin Lu wrote: >> Naoto Sato 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 merge/rebase. The pull request contains four additional >> commits sinc

Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-08-20 Thread Stuart Marks
On Mon, 14 Jul 2025 20:23:25 GMT, Naoto Sato wrote: >> In prior JDK releases, `System.console()` could return a `Console` instance >> even when the JVM was not attached to an interactive terminal. This could >> lead to confusion, particularly when input was not from a keyboard or output >> was

Re: RFR: 7191877: TEST_BUG: java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java failing intermittently

2025-08-11 Thread Stuart Marks
On Wed, 6 Aug 2025 10:29:45 GMT, Johny Jose wrote: > The test was problem listed since jdk8 as intermittent failures were > observed. For all the failed scenarios, number of objects left in leaseTable > were less than or equal to 4. Though for most of the runs the number of > objects left is l

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

2025-08-07 Thread Stuart Marks
On Sun, 3 Aug 2025 13:42:41 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 an

Re: RFR: 7191877: TEST_BUG: java/rmi/transport/checkLeaseInfoLeak/CheckLeaseLeak.java failing intermittently

2025-08-06 Thread Stuart Marks
On Wed, 6 Aug 2025 10:29:45 GMT, Johny Jose wrote: > The test was problem listed since jdk8 as intermittent failures were > observed. For all the failed scenarios, number of objects left in leaseTable > were less than or equal to 4. Though for most of the runs the number of > objects left is l

Re: RFR: 8357272: Add overrides for all default methods to wrapper collections

2025-06-26 Thread Stuart Marks
On Wed, 28 May 2025 03:03:45 GMT, Stuart Marks wrote: > This mostly just adds overrides to the wrapper implementations in > java.util.Collections. However, in order to satisfy the test, some overrides > are also added to ReverseOrderSortedMapView, which is used by the SortedMap

RFR: 8357272: Add overrides for all default methods to wrapper collections

2025-06-25 Thread Stuart Marks
This mostly just adds overrides to the wrapper implementations in java.util.Collections. However, in order to satisfy the test, some overrides are also added to ReverseOrderSortedMapView, which is used by the SortedMap wrapper keySet, values, and entrySet views. These overrides don't do anything

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

2025-06-23 Thread Stuart Marks
On Thu, 19 Jun 2025 11:08:32 GMT, Markus KARG 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: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-23 Thread Stuart Marks
On Thu, 19 Jun 2025 10:57:52 GMT, Markus KARG wrote: >>> I think we should treat "\r\n" as a single line terminator? >> >> You are correct: that needs to be fixed: >> >> jshell> Reader r = new StringReader("hello\r\nworld") >> r ==> java.io.StringReader@480bdb19 >> >> jshell> r.readAllLines()

Re: [jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Stuart Marks
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

[jdk25] Integrated: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Stuart Marks
On Tue, 17 Jun 2025 17:15:21 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

[jdk25] RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-17 Thread Stuart Marks
Hi all, This pull request contains a backport of commit [06d804a0](https://github.com/openjdk/jdk/commit/06d804a0f004f9403c7c12e1a9f2ca8775c639f7) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Stuart Marks on 16 Jun 2025 and was

Integrated: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-16 Thread Stuart Marks
On Wed, 11 Jun 2025 22:39:48 GMT, Stuart Marks wrote: > Add a note to String.trim pointing to the String.strip family of methods. > > Add notes cross-linking String.isBlank and String.isEmpty. This pull request has now been integrated. Changeset: 06d804a0 Author: Stuart M

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v4]

2025-06-12 Thread Stuart Marks
On Thu, 12 Jun 2025 23:39:44 GMT, Stuart Marks wrote: >> Add a note to String.trim pointing to the String.strip family of methods. >> >> Add notes cross-linking String.isBlank and String.isEmpty. > > Stuart Marks has updated the pull request incrementally with one additi

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v4]

2025-06-12 Thread Stuart Marks
> Add a note to String.trim pointing to the String.strip family of methods. > > Add notes cross-linking String.isBlank and String.isEmpty. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: More wording updates. -

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v4]

2025-06-12 Thread Stuart Marks
On Thu, 12 Jun 2025 23:21:15 GMT, Stuart Marks wrote: >>> I'd describe this as "space plus ASCII control characters." Would something >>> like that make more sense? >> >> Yeah, I think so > > OK, I've updated the wording. Let me know if

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v3]

2025-06-12 Thread Stuart Marks
> Add a note to String.trim pointing to the String.strip family of methods. > > Add notes cross-linking String.isBlank and String.isEmpty. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Update wording per s

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v3]

2025-06-12 Thread Stuart Marks
On Thu, 12 Jun 2025 01:54:40 GMT, Naoto Sato wrote: >> Oh yeah, that should be "an ASCII" >> >> But maybe we should change the wording per @naotoj's comment. I don't want >> to repeat the specification above, but rather I want to describe it in terms >> of what the thinking was at the time

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-11 Thread Stuart Marks
On Wed, 11 Jun 2025 23:57:48 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/lang/String.java line 3837: >> >>> 3835: * >>> 3836: * @apiNote >>> 3837: * This method uses a ASCII-based definition of space characters >>> that are to be >> >> "a ASCII" or "an ASCII"? > >

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v2]

2025-06-11 Thread Stuart Marks
> Add a note to String.trim pointing to the String.strip family of methods. > > Add notes cross-linking String.isBlank and String.isEmpty. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Use {@return ...} i

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs [v2]

2025-06-11 Thread Stuart Marks
On Thu, 12 Jun 2025 00:35:12 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/lang/String.java line 3937: >> >>> 3935: >>> 3936: /** >>> 3937: * Returns {@code true} if the string is empty or contains only >> >> This

Re: RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-11 Thread Stuart Marks
On Wed, 11 Jun 2025 23:57:02 GMT, Justin Lu wrote: >> Add a note to String.trim pointing to the String.strip family of methods. >> >> Add notes cross-linking String.isBlank and String.isEmpty. > > src/java.base/share/classes/java/lang/String.java line 3937: > >> 3935: >> 3936: /** >> 3937:

RFR: 8338140: (str) Add notes to String.trim and String.isEmpty pointing to newer APIs

2025-06-11 Thread Stuart Marks
Add a note to String.trim pointing to the String.strip family of methods. Add notes cross-linking String.isBlank and String.isEmpty. - Commit messages: - Updates to String javadoc. Changes: https://git.openjdk.org/jdk/pull/25762/files Webrev: https://webrevs.openjdk.org/?repo=jdk

[jdk25] Integrated: 8358809: Improve link to stdin.encoding from java.lang.IO

2025-06-06 Thread Stuart Marks
On Fri, 6 Jun 2025 22:07:38 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [d024f58e](https://github.com/openjdk/jdk/commit/d024f58e61ec27f6c13fde5dadb95c31875815d6) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

Re: [jdk25] RFR: 8358809: Improve link to stdin.encoding from java.lang.IO

2025-06-06 Thread Stuart Marks
On Fri, 6 Jun 2025 22:07:38 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [d024f58e](https://github.com/openjdk/jdk/commit/d024f58e61ec27f6c13fde5dadb95c31875815d6) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

[jdk25] RFR: 8358809: Improve link to stdin.encoding from java.lang.IO

2025-06-06 Thread Stuart Marks
Hi all, This pull request contains a backport of commit [d024f58e](https://github.com/openjdk/jdk/commit/d024f58e61ec27f6c13fde5dadb95c31875815d6) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Stuart Marks on 6 Jun 2025 and was

Integrated: 8358809: Improve link to stdin.encoding from java.lang.IO

2025-06-06 Thread Stuart Marks
On Fri, 6 Jun 2025 18:34:10 GMT, Stuart Marks wrote: > Use a link of the form `System##stdin.encoding` to link directly to the > system property's description. This pull request has now been integrated. Changeset: d024f58e Author:Stuart Marks URL: https://git.open

RFR: 8358809: better link to stdin.encoding from java.lang.IO

2025-06-06 Thread Stuart Marks
Use a link of the form `System##stdin.encoding` to link directly to the system property's description. - Commit messages: - 8358809: better link to stdin.encoding from java.lang.IO Changes: https://git.openjdk.org/jdk/pull/25676/files Webrev: https://webrevs.openjdk.org/?repo=jdk

Re: RFR: 8351594: JFR: Rate-limited sampling of Java events [v3]

2025-06-04 Thread Stuart Marks
On Wed, 4 Jun 2025 16:04:08 GMT, Erik Gahlin wrote: >> src/java.base/share/classes/java/net/Socket.java line 970: >> >>> 968: long end = SocketReadEvent.timestamp(); >>> 969: long duration = end - start; >>> 970: if (SocketReadEvent.shouldThrottleCommit(durati

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v2]

2025-06-04 Thread Stuart Marks
On Wed, 4 Jun 2025 16:50:15 GMT, Johannes Döbler wrote: >> Interesting. This `@NoOverride` idea could be useful on a subclass that >> wants to make sure it overrides everything. (Maybe `@NoInherit` would be a >> better name.) Meanwhile for JDK-8357272 (PR >> https://github.com/openjdk/jdk/pull

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v2]

2025-06-04 Thread Stuart Marks
On Wed, 4 Jun 2025 04:08:36 GMT, Joe Darcy wrote: >> The `@Override` annotation has been inconsistently applied in the >> collections implementations. In practice since so many methods are >> overridden, and some test would likely fail if a method weren't overridden >> properly, the annotation

Integrated: 8358015: Fix SequencedMap sequenced view method specifications

2025-06-04 Thread Stuart Marks
On Thu, 29 May 2025 00:21:35 GMT, Stuart Marks wrote: > For a full explanation, see the bug report > [JDK-8358015](https://bugs.openjdk.org/browse/JDK-8358015). > > This PR includes three related changes: > * New overrides in SequencedMap view collection implementations, which

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v3]

2025-06-03 Thread Stuart Marks
c` clauses to reflect this behavior (which was > previously ill-specified). > * Update to a test which relied on unspecified behavior. Stuart Marks 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 i

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v2]

2025-06-03 Thread Stuart Marks
On Mon, 2 Jun 2025 20:41:41 GMT, Joe Darcy wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Tweak nsee() declaration; adjust specs per suggestion; update copyrights. > > src/jav

Re: RFR: 8357798: ReverseOrderListView uses Boolean boxes after JDK-8356080 [v2]

2025-06-03 Thread Stuart Marks
On Mon, 2 Jun 2025 13:26:36 GMT, Aleksey Shipilev wrote: >> SonarCloud complains that since >> [JDK-8356080](https://bugs.openjdk.org/browse/JDK-8356080) we are using >> `Boolean` boxes in `ReverseOrderListView`. This change `boolean` -> >> `Boolean` was made in >> [JDK-8356080](https://bugs.

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v2]

2025-05-30 Thread Stuart Marks
c` clauses to reflect this behavior (which was > previously ill-specified). > * Update to a test which relied on unspecified behavior. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Tweak nsee() declaration; adjust specs per su

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications

2025-05-30 Thread Stuart Marks
On Fri, 30 May 2025 14:38:19 GMT, Jaikiran Pai wrote: >> Overall this looks good to me. I just have a small question about the newly >> introduced text. >> >> The copyright years on BasicMap.java and SequencedMap.java will need a >> update before integrating. > >> I just have a small question

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications

2025-05-30 Thread Stuart Marks
On Fri, 30 May 2025 14:33:05 GMT, Jaikiran Pai wrote: >> For a full explanation, see the bug report >> [JDK-8358015](https://bugs.openjdk.org/browse/JDK-8358015). >> >> This PR includes three related changes: >> * New overrides in SequencedMap view collection implementations, which >> improve

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications

2025-05-30 Thread Stuart Marks
On Thu, 29 May 2025 19:44:20 GMT, ExE Boss wrote: >> For a full explanation, see the bug report >> [JDK-8358015](https://bugs.openjdk.org/browse/JDK-8358015). >> >> This PR includes three related changes: >> * New overrides in SequencedMap view collection implementations, which >> improve thei

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications

2025-05-30 Thread Stuart Marks
On Fri, 30 May 2025 02:33:27 GMT, Chen Liang wrote: >> For a full explanation, see the bug report >> [JDK-8358015](https://bugs.openjdk.org/browse/JDK-8358015). >> >> This PR includes three related changes: >> * New overrides in SequencedMap view collection implementations, which >> improve th

Re: RFR: 8328821: Map.of() derived view collection mutators should throw UnsupportedOperationException [v11]

2025-05-29 Thread Stuart Marks
On Fri, 30 May 2025 02:23:17 GMT, Liam Miller-Cushon wrote: > I have reviewed the CSR for you. Maybe us, Per Minborg, and Stuart Marks can > work together to get the two significant collection changes into early 26 and > broadcast on quality discuss list, as otherwise corpus analysis

RFR: 8358015: Fix SequencedMap sequenced view method specifications

2025-05-29 Thread Stuart Marks
For a full explanation, see the bug report [JDK-8358015](https://bugs.openjdk.org/browse/JDK-8358015). This PR includes three related changes: * New overrides in SequencedMap view collection implementations, which improve their behavior. * Update to `@implSpec` clauses to reflect this behavior (

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

2025-05-27 Thread Stuart Marks
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: 8357798: ReverseOrderListView uses Boolean boxes after JDK-8356080

2025-05-27 Thread Stuart Marks
On Mon, 26 May 2025 17:08:45 GMT, Aleksey Shipilev wrote: > SonarCloud complains that since > [JDK-8356080](https://bugs.openjdk.org/browse/JDK-8356080) we are using > `Boolean` boxes in `ReverseOrderListView`. This change `boolean` -> `Boolean` > was made in [JDK-8356080](https://bugs.openjdk

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v5]

2025-05-23 Thread Stuart Marks
On Thu, 22 May 2025 17:46:33 GMT, Naoto Sato wrote: >> `java.io.Console` uses the charset specified by the `stdout.encoding` system >> property for both input and output. While this is generally sufficient, >> since Console is intended for interactive terminal use, some platforms allow >> diff

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v5]

2025-05-23 Thread Stuart Marks
On Fri, 23 May 2025 16:26:36 GMT, Naoto Sato wrote: > Can they even possibly do so? Sure, as far as I know, IntelliJ IDEA runs on its own version of the JDK, and it can easily be invoked or modified to allow use of those modules. I took a quick look at NetBeans and didn't see any references to

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v5]

2025-05-22 Thread Stuart Marks
On Thu, 22 May 2025 17:46:33 GMT, Naoto Sato wrote: >> `java.io.Console` uses the charset specified by the `stdout.encoding` system >> property for both input and output. While this is generally sufficient, >> since Console is intended for interactive terminal use, some platforms allow >> diff

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-22 Thread Stuart Marks
On Wed, 21 May 2025 16:48:20 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/io/Console.java line 67: >> >>> 65: * stdout.encoding}, in which case read operations use the {@code >>> Charset} >>> 66: * designated by {@code stdin.encoding}. >>> 67: * >> >> `Console.charset()` stat

Integrated: 8351230: Collections.synchronizedList returns a list that is not thread-safe

2025-05-19 Thread Stuart Marks
On Thu, 1 May 2025 19:05:50 GMT, Stuart Marks wrote: > Collections.synchronizedList() returns a List implementation that doesn't do > proper locking. This PR does the following on the synchronized wrapper: > > - overrides and adds locking to SequencedCollection methods; >

Re: RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe [v3]

2025-05-16 Thread Stuart Marks
views; > - adds test for race conditions and functional tests of synchronized wrappers. Stuart Marks 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 merge/rebase. The pull request contains e

Re: RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe [v2]

2025-05-16 Thread Stuart Marks
On Thu, 15 May 2025 12:17:14 GMT, Per Minborg wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reversed view of SynchronizedRandomAccessList should also be RandomAccess. >> Add t

Re: RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe [v2]

2025-05-16 Thread Stuart Marks
On Fri, 16 May 2025 09:24:13 GMT, Jaikiran Pai wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reversed view of SynchronizedRandomAccessList should also be RandomAccess. >> Add t

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

2025-05-14 Thread Stuart Marks
On Wed, 14 May 2025 17:53:48 GMT, Markus KARG wrote: >> The code should use the three-arg read() call in order to limit self-calls, >> in order to avoid the fragile base class problem. At some point we might >> want to add implSpec tags to specify this. See my previous comments relate >> to th

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

2025-05-14 Thread Stuart Marks
On Wed, 14 May 2025 21:02:20 GMT, Markus KARG wrote: >> Both `subSequence` and `getChars` are implemented by the CharSequence. >> They have the same level of trustworthiness about their implementation. > > I meant that the implementation of `subSequence` *might or might not* perform > copy (so w

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

2025-05-14 Thread Stuart Marks
On Wed, 14 May 2025 17:40:53 GMT, Brian Burkhalter wrote: >> All other self-calls to a `read` method are to the three-arg abstract method: >> >> $ grep read( src/java.base/share/classes/java/io/Reader.java | grep -v >> public | grep -v * >> nread = this.read(cbuf, off, rem); >>

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

2025-05-14 Thread Stuart Marks
On Tue, 13 May 2025 15:33:39 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: "stream" -> "reader" src/java.base/share/cla

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 [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: 8356486: ReverseOrderListView should override reversed() to return `base` [v2]

2025-05-09 Thread Stuart Marks
On Fri, 9 May 2025 07:50:29 GMT, Per Minborg wrote: >> This PR proposed to let `ReverseOrderListView::reversed` directly return >> `base` instead of going though a more complicated code path. > > Per Minborg has updated the pull request incrementally with two additional > commits since the last

Re: RFR: 8356486: ReverseOrderListView should override reversed() to return `base` [v2]

2025-05-09 Thread Stuart Marks
On Fri, 9 May 2025 07:03:30 GMT, Per Minborg wrote: >> There are some new collections (such as StableList) that are not covered in >> Basic. But maybe they should have their separate tests? > > `UnmodifiableSequencedCollection` double-reversed is not an identity > function. But at least, it doe

Re: RFR: 8356486: ReverseOrderListView::reversed should return `base`

2025-05-08 Thread Stuart Marks
On Thu, 8 May 2025 14:30:28 GMT, Per Minborg wrote: > This PR proposed to let `ReverseOrderListView::reversed` return `base` so > that nested reversed views are avoided. src/java.base/share/classes/java/util/ReverseOrderListView.java line 398: > 396: } > 397: > 398: @Override I don't

Re: RFR: 8356080: Address post-integration comments for Stable Values

2025-05-08 Thread Stuart Marks
On Fri, 2 May 2025 12:13:39 GMT, Per Minborg wrote: > This PR proposes to address comments in the initial PR for Stable Values, > which were deferred until after integration. > > Unfortunately, this PR shows the total commit history for stable values. src/java.base/share/classes/java/util/Immu

Re: RFR: 8356486: ReverseOrderListView::reversed should return `base`

2025-05-08 Thread Stuart Marks
On Thu, 8 May 2025 14:44:26 GMT, Chen Liang wrote: >> This PR proposed to let `ReverseOrderListView::reversed` return `base` so >> that nested reversed views are avoided. > > test/jdk/java/util/Collection/MOAT.java line 507: > >> 505: private static void testImmutableSeqColl(final >> Sequ

Re: RFR: 8356486: ReverseOrderListView::reversed should return `base`

2025-05-08 Thread Stuart Marks
On Thu, 8 May 2025 14:30:28 GMT, Per Minborg wrote: > This PR proposed to let `ReverseOrderListView::reversed` return `base` so > that nested reversed views are avoided. I think there are already tests to ensure that list.reversed().reversed() returns the original list. See also https://github

Re: RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe [v2]

2025-05-05 Thread Stuart Marks
On Sun, 4 May 2025 17:51:48 GMT, Luca Kellermann wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reversed view of SynchronizedRandomAccessList should also be RandomAccess. >> Add t

Re: RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe [v2]

2025-05-05 Thread Stuart Marks
views; > - adds test for race conditions and functional tests of synchronized wrappers. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Reversed view of SynchronizedRandomAccessList should also be RandomAccess. Add tests to

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 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

RFR: 8351230: Collections.synchronizedList returns a list that is not thread-safe

2025-05-02 Thread Stuart Marks
Collections.synchronizedList() returns a List implementation that doesn't do proper locking. This PR does the following on the synchronized wrapper: - overrides and adds locking to SequencedCollection methods; - performs instance management of reversed synchronized views; - adds test for race con

Re: RFR: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v8]

2025-05-01 Thread Stuart Marks
On Thu, 1 May 2025 18:43:57 GMT, Chen Liang wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updating copyright year. > > src/java.base/share/classes/java/lang/IO.java line 157: > >> 155: * >> 156: * Write

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: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v5]

2025-05-01 Thread Stuart Marks
On Thu, 1 May 2025 09:51:41 GMT, Tatsunori Uchino wrote: >> Anyway you need to merge master first to test `stdin.encoding`. > > `stdin.encoding` seems to work as intended in Windows for Japanese. (I > managed to get the Windows binary of my PR) No need to change. (I wish the > constructors of `

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type

2025-04-25 Thread Stuart Marks
On Fri, 25 Apr 2025 23:37:13 GMT, Brent Christian wrote: > The newly-added `WhiteBox.waitForReferenceProcessing()` (see > [8305186](https://bugs.openjdk.org/browse/JDK-8305186)) always fails with > assertions enabled. > I've updated the assertion, and also added the test I used locally to test

Integrated: 8350703: Add standard system property stdin.encoding

2025-04-25 Thread Stuart Marks
On Thu, 17 Apr 2025 18:59:33 GMT, Stuart Marks wrote: > * Windows and Unix: set sprops.stdin_encoding if connected to a console > * Add specs for stdin.encoding > * Adjust specs to change "undefined" to "unspecified" > * Rewrite System.in spec to refer to new pr

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v4]

2025-04-24 Thread Stuart Marks
On Tue, 22 Apr 2025 18:56:40 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/lang/IO.java line 41: >> >>> 39: * The {@link #readln()} and {@link #readln(String)} methods decode >>> bytes read from >>> 40: * {@code System.in} into chara

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-24 Thread Stuart Marks
On Wed, 16 Apr 2025 17:37:07 GMT, David Beaumont wrote: >> Increasing timeout for deadlock detection and adjusting for the timeout >> factor in higher tiers. > > David Beaumont has updated the pull request incrementally with one additional > commit since the last revision: > > Removing test

Re: RFR: 8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6 [v2]

2025-04-24 Thread Stuart Marks
On Tue, 22 Apr 2025 13:53:14 GMT, Daniel Fuchs wrote: >> test/jdk/java/util/logging/LoggingDeadlock5.java line 127: >> >>> 125: // in higher tiers, so it's necessary to be a bit pessimistic >>> here. >>> 126: private final static Duration JOIN_WAIT = >>> 127: Dur

Re: RFR: 8350703: Add standard system property stdin.encoding [v3]

2025-04-23 Thread Stuart Marks
m encoding > * Update property test Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Yet another minor bit of wordsmithing. - Changes: - all: https://git.openjdk.org/jdk/pull/24738/files - new: https://git.ope

Re: RFR: 8350703: Add standard system property stdin.encoding

2025-04-23 Thread Stuart Marks
On Thu, 17 Apr 2025 18:59:33 GMT, Stuart Marks wrote: > * Windows and Unix: set sprops.stdin_encoding if connected to a console > * Add specs for stdin.encoding > * Adjust specs to change "undefined" to "unspecified" > * Rewrite System.in spec to refer to new pr

Re: RFR: 8350703: Add standard system property stdin.encoding [v2]

2025-04-23 Thread Stuart Marks
On Wed, 23 Apr 2025 01:34:42 GMT, Naoto Sato wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update sun.stdout/err.encoding comments; tweak Windows file handle >> variable name. &g

  1   2   3   4   5   6   >