Re: RFR: 8308694: Clarify reversed() default methods' implementation requirements

2023-06-22 Thread Stuart Marks
On Thu, 15 Jun 2023 22:38:43 GMT, Stuart Marks wrote: > Can I get a preliminary review of the wording for Deque.reversed()? If the > text is good, I'll make corresponding changes to the implSpecs of the other > reversed() default methods, namely those in List, SortedMap, and So

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-06-22 Thread Stuart Marks
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 OK. Feel free to discuss things here before trying to wordsmith the CSR. It's probably easier to discuss and get agreement on a sketch of a solution before trying to commit the s

Re: RFR: 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException

2023-07-06 Thread Stuart Marks
On Thu, 6 Jul 2023 20:55:15 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/Closeable.java line 60: >> >>> 58: * with it. If the stream is already closed then invoking this >>> 59: * method has no effect. >>> 60: * >> >> Can you add an example showing the reco

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text [v4]

2023-07-06 Thread Stuart Marks
On Tue, 4 Jul 2023 22:03:58 GMT, John R Rose wrote: >>> Hmm, I think that issue refers to code that have explicit non-Object >>> parameter types (like `X::equals(Object)boolean` in the issue's sample). >>> This method already have both arguments as `Object`, so I don't think >>> there's any ty

Re: RFR: 8066869: Add Closeable::closeUnchecked that is the equivalent of close but throws UncheckedIOException

2023-07-06 Thread Stuart Marks
On Thu, 6 Jul 2023 22:48:12 GMT, Brian Burkhalter wrote: > Unless it's a matter of further background investigation, I think actually > making any such changes would be better handled as a separate issue. OK. It doesn't have to be part of this change, but it would good if some example use case

Re: RFR: 8308694: Clarify reversed() default methods' implementation requirements [v3]

2023-07-07 Thread Stuart Marks
> Can I get a preliminary review of the wording for Deque.reversed()? If the > text is good, I'll make corresponding changes to the implSpecs of the other > reversed() default methods, namely those in List, SortedMap, and SortedSet > and then file the CSR. Stuart Marks has

Re: RFR: 8308694: Clarify reversed() default methods' implementation requirements [v4]

2023-07-07 Thread Stuart Marks
> Can I get a preliminary review of the wording for Deque.reversed()? If the > text is good, I'll make corresponding changes to the implSpecs of the other > reversed() default methods, namely those in List, SortedMap, and SortedSet > and then file the CSR. Stuart Marks has

Re: List extending Collection/SequencedCollection

2023-07-07 Thread Stuart Marks
Hi Ryan, Thanks for trying out JDK 21 early access. The issue you raise is indeed an inconsistency, but it's not clear which way it should be resolved, or even whether it needs to be resolved, as the consequences are quite minor. Specifically, when the Sequenced Collections JEP was integrate

Re: RFR: 8308694: Clarify reversed() default methods' implementation requirements [v4]

2023-07-10 Thread Stuart Marks
On Fri, 7 Jul 2023 22:55:12 GMT, Stuart Marks wrote: >> Can I get a preliminary review of the wording for Deque.reversed()? If the >> text is good, I'll make corresponding changes to the implSpecs of the other >> reversed() default methods, namely those in List, S

Integrated: 8308694: Clarify reversed() default methods' implementation requirements

2023-07-12 Thread Stuart Marks
On Thu, 15 Jun 2023 22:38:43 GMT, Stuart Marks wrote: > Can I get a preliminary review of the wording for Deque.reversed()? If the > text is good, I'll make corresponding changes to the implSpecs of the other > reversed() default methods, namely those in List, SortedMap, and So

[jdk21] RFR: 8308694: Clarify reversed() default methods' implementation requirements

2023-07-12 Thread Stuart Marks
Hi all, This pull request contains a backport of commit [f82c8184](https://github.com/openjdk/jdk/commit/f82c8184b26142da4018ae096cfa39d87a4c6540) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Stuart Marks on 12 Jul 2023 and was

[jdk21] Integrated: 8308694: Clarify reversed() default methods' implementation requirements

2023-07-12 Thread Stuart Marks
On Wed, 12 Jul 2023 18:21:29 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [f82c8184](https://github.com/openjdk/jdk/commit/f82c8184b26142da4018ae096cfa39d87a4c6540) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

RFR: 8306785: fix deficient spliterators for Sequenced Collections

2023-07-12 Thread Stuart Marks
Change some reverse-ordered spliterators to use `Spliterators.spliterator(Collection, ORDERED)` instead of `Spliterators.spliteratorUnknownSize()`. This gives SIZED and ORDERED spliterators. More optimizations will be done later. I'm intending to backport this to JDK 21 so I want this to be min

Re: RFR: 8306785: fix deficient spliterators for Sequenced Collections

2023-07-12 Thread Stuart Marks
On Wed, 12 Jul 2023 17:25:03 GMT, Stuart Marks wrote: > Change some reverse-ordered spliterators to use > `Spliterators.spliterator(Collection, ORDERED)` instead of > `Spliterators.spliteratorUnknownSize()`. This gives SIZED and ORDERED > spliterators. More optimizations will b

Integrated: 8306785: fix deficient spliterators for Sequenced Collections

2023-07-12 Thread Stuart Marks
On Wed, 12 Jul 2023 17:25:03 GMT, Stuart Marks wrote: > Change some reverse-ordered spliterators to use > `Spliterators.spliterator(Collection, ORDERED)` instead of > `Spliterators.spliteratorUnknownSize()`. This gives SIZED and ORDERED > spliterators. More optimizations will b

[jdk21] RFR: 8306785: fix deficient spliterators for Sequenced Collections

2023-07-12 Thread Stuart Marks
Hi all, This pull request contains a backport of commit [743e8b8e](https://github.com/openjdk/jdk/commit/743e8b8e0a9fe032a0dd652a4fef1f761af66595) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Stuart Marks on 12 Jul 2023 and was

[jdk21] Integrated: 8306785: fix deficient spliterators for Sequenced Collections

2023-07-13 Thread Stuart Marks
On Thu, 13 Jul 2023 05:45:37 GMT, Stuart Marks wrote: > Hi all, > > This pull request contains a backport of commit > [743e8b8e](https://github.com/openjdk/jdk/commit/743e8b8e0a9fe032a0dd652a4fef1f761af66595) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

Re: RFR: 8266571: Sequenced Collections [v4]

2023-07-21 Thread Stuart Marks
On Tue, 28 Mar 2023 02:37:22 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Simplify handling of cached keySet, value

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Stuart Marks
On Fri, 21 Jul 2023 16:19:35 GMT, Hollis Waite wrote: >> Stuart Marks has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 96 commits: >> >> - Merge branch 'master' into JDK-8266571-SequencedC

Re: RFR: 8305734: BitSet.get(int, int) always returns the empty BitSet when the Integer.MAX VALUE is set

2023-07-21 Thread Stuart Marks
On Fri, 7 Apr 2023 12:22:03 GMT, Andy-Tatman wrote: > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8305734 and > https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8311905 Hi, thanks for the background and the discussion of the alternatives. I'm not sure that drafting the CSR is th

Re: RFR: 8311517: ArrayList javadoc improvements related to sequenced collection updates

2023-07-26 Thread Stuart Marks
On Wed, 26 Jul 2023 11:02:20 GMT, dan1st wrote: > The [JEP for sequenced collections](https://openjdk.org/jeps/431) would add > addFirst(), removeFirst() and reversed() methods to lists. > However, the Javadoc of List mentions: > > The size, isEmpty, get, set, iterator, and listIterator operati

Re: RFR: 8311517: ArrayList javadoc improvements related to sequenced collection updates

2023-07-26 Thread Stuart Marks
On Wed, 26 Jul 2023 11:02:20 GMT, dan1st wrote: > The [JEP for sequenced collections](https://openjdk.org/jeps/431) would add > addFirst(), removeFirst() and reversed() methods to lists. > However, the Javadoc of List mentions: > > The size, isEmpty, get, set, iterator, and listIterator operati

Re: RFR: 8311517: ArrayList javadoc improvements related to sequenced collection updates

2023-07-26 Thread Stuart Marks
On Wed, 26 Jul 2023 11:02:20 GMT, dan1st wrote: > The [JEP for sequenced collections](https://openjdk.org/jeps/431) would add > addFirst(), removeFirst() and reversed() methods to lists. > However, the Javadoc of List mentions: > > The size, isEmpty, get, set, iterator, and listIterator operati

Re: CFV: New Core Libraries Group Member: Brian Burkhalter

2023-07-31 Thread Stuart Marks
Vote: yes On 7/27/23 11:35 AM, Roger Riggs wrote: |I hereby nominate |Brian Burkhalter|to Membership in the Core Libraries Group Brian has been working in the Core Library team since 2012. Brian's many contributions to the OpenJDK libraries include java.io subsystems, NIO channels, files, and b

Re: CFV: New Core Libraries Group Member: Joe Wang

2023-07-31 Thread Stuart Marks
Vote: yes On 7/27/23 11:36 AM, Roger Riggs wrote: |I hereby nominate Joe Wang||to Membership in the Core Libraries Group Joe has been working in the core library team since 2012. He has been maintaining and improving the XML library APIs and implementations including ||DOM, SAX, StAX, Transform

Re: CFV: New Core Libraries Group Member: Brent Christian

2023-07-31 Thread Stuart Marks
Vote: yes On 7/27/23 11:36 AM, Roger Riggs wrote: |I hereby nominate |Brent Christian|to Membership in the Core Libraries Group Brent has been working in the Core Library team at Oracle since 2012. He has made contributions to many areas of OpenJDK including java.lang strings, class loader, NIO

RFR: 8159527: Collections mutator methods should all be marked as optional operations

2023-08-02 Thread Stuart Marks
Adjust the leading javadoc sentence of several collections mutator methods to include "(optional operation)" as appropriate. Also adjust doc for UnsupportedOperationException on those methods as necessary. - Commit messages: - Adjust wording of various UnsupportedOperationException

Re: RFR: 8312976: MatchResult produces StringIndexOutOfBoundsException for groups outside match [v4]

2023-08-03 Thread Stuart Marks
On Mon, 31 Jul 2023 18:38:30 GMT, Raffaello Giulietti wrote: >> Fixes a bug showing up after >> [JDK-8132995](https://bugs.openjdk.org/browse/JDK-8132995) when there are >> capturing groups outside the match. > > Raffaello Giulietti has updated the pull request with a new target base due > to

Re: RFR: 8311517: Add performance information to ArrayList javadoc [v2]

2023-08-03 Thread Stuart Marks
On Thu, 27 Jul 2023 06:31:06 GMT, dan1st wrote: >> The [JEP for sequenced collections](https://openjdk.org/jeps/431) would add >> addFirst(), removeFirst() and reversed() methods to lists. >> However, the Javadoc of List mentions: >> > The size, isEmpty, get, set, iterator, and listIterator ope

Re: RFR: 8311517: Add performance information to ArrayList javadoc [v2]

2023-08-04 Thread Stuart Marks
On Fri, 4 Aug 2023 07:11:58 GMT, dan1st wrote: >> Thanks for the updates. I've drafted a CSR; see link in header. Please take >> a look. > >> Thanks for the updates. I've drafted a CSR; see link in header. Please take >> a look. > > @stuart-marks Th

Integrated: 8159527: Collections mutator methods should all be marked as optional operations

2023-08-04 Thread Stuart Marks
On Wed, 2 Aug 2023 20:11:35 GMT, Stuart Marks wrote: > Adjust the leading javadoc sentence of several collections mutator methods to > include "(optional operation)" as appropriate. Also adjust doc for > UnsupportedOperationException on those methods as necessary. This p

Re: RFR: 8314236: Overflow in Collections.rotate [v2]

2023-08-16 Thread Stuart Marks
On Tue, 15 Aug 2023 09:51:40 GMT, Aleksey Shipilev wrote: >> Nikita Sakharin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8314236: change bug number and summary > > test/jdk/java/util/Collections/RotateHuge.java line 27: > >> 25: *

Re: RFR: 8314236: Overflow in Collections.rotate [v4]

2023-08-23 Thread Stuart Marks
On Thu, 17 Aug 2023 10:54:07 GMT, Nikita Sakharin wrote: >> `Collections.rotate` method contains a bug. This method throws >> IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way >> to reproduce: >> >> final int size = (1 << 30) + 1; >> final List list = new ArrayList<>(s

Re: RFR: 8314236: Overflow in Collections.rotate [v8]

2023-08-28 Thread Stuart Marks
On Fri, 25 Aug 2023 13:20:54 GMT, Nikita Sakharin wrote: >> `Collections.rotate` method contains a bug. This method throws >> IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way >> to reproduce: >> >> final int size = (1 << 30) + 1; >> final List list = new ArrayList<>(s

Re: CFV: New Core Libraries Group Member: Michael McMahon

2023-08-29 Thread Stuart Marks
Vote: yes On 8/25/23 8:24 AM, Roger Riggs wrote: I hereby nominate Michael McMahon to Membership in the Core Libraries Group Michael has been contributing to the OpenJDK Core Libraries since 2008, originally at Sun Microsystems, now Oracle. He has deep networking experience and has made more

Re: CFV: New Core Libraries Group Member: Daniel Fuchs

2023-08-29 Thread Stuart Marks
Vote: yes On 8/25/23 8:23 AM, Roger Riggs wrote: I hereby nominate Daniel Fuchs to Membership in the Core Libraries Group Daniel has been contributing to the OpenJDK Core Libraries at Oracle since 2012. He is leading the networking team and has made nearly 400 contributions to OpenJDK since J

Re: CFV: New Core Libraries Group Member: Lance Andersen

2023-08-29 Thread Stuart Marks
Vote: yes On 8/25/23 8:23 AM, Roger Riggs wrote: I hereby nominate Lance Andersen to Membership in the Core Libraries Group Lance has been contributing to the OpenJDK at Oracle since 2007. He has been the JDBC spec lead since 2005 and an OpenJDK committer since day 1. He has extensive experie

Re: RFR: 8314236: Overflow in Collections.rotate [v9]

2023-08-29 Thread Stuart Marks
On Tue, 29 Aug 2023 20:00:49 GMT, Nikita Sakharin wrote: >> `Collections.rotate` method contains a bug. This method throws >> IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way >> to reproduce: >> >> final int size = (1 << 30) + 1; >> final List list = new ArrayList<>(s

Re: RFR: 8315850: Improve AbstractMap anonymous Iterator classes [v2]

2023-09-07 Thread Stuart Marks
On Thu, 7 Sep 2023 17:23:20 GMT, Per Minborg wrote: >> This PR proposes to slightly improve some iterators of `AbstractMap`: >> >> * Code reuse >> * A field declared `final` >> * Add missing `@Override` annotations > > Per Minborg has updated the pull request incrementally with one additional >

Re: RFR: 8315850: Improve AbstractMap anonymous Iterator classes

2023-09-07 Thread Stuart Marks
On Thu, 7 Sep 2023 12:24:58 GMT, Rémi Forax wrote: >> This PR proposes to slightly improve some iterators of `AbstractMap`: >> >> * Code reuse >> * A field declared `final` >> * Add missing `@Override` annotations > > Hello, > In Java, sharing code may have a runtime cost (or not) depending on t

Re: RFR: 8306632: Add a JDK Property for specifying DTD support

2023-09-07 Thread Stuart Marks
On Fri, 28 Jul 2023 18:41:48 GMT, Joe Wang wrote: > Add a JDK Impl specific property 'jdk.xml.dtd.support' for applications to > specify how DTDs are handled. This property is uniformly supported across the > JDK XML libraries. It complements, rather than replaces, the existing > properties th

RFR: 8314896: additional clarifications to reversed() default methods' implementation requirements

2023-09-18 Thread Stuart Marks
Wording changes to make clear that the scenarios described are merely examples and are not normative requirements. - Commit messages: - Update wording for {Deque,List,SortedMap,SortedSet}.reversed implSpecs. Changes: https://git.openjdk.org/jdk/pull/15799/files Webrev: https://web

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v16]

2023-09-27 Thread Stuart Marks
On Fri, 22 Jul 2022 20:51:59 GMT, Brent Christian wrote: >> Please review this change to replace the finalizer in >> `AbstractLdapNamingEnumeration` with a Cleaner. >> >> The pieces of state required for cleanup (`LdapCtx homeCtx`, `LdapResult >> res`, and `LdapClient enumClnt`) are moved to a

Re: RFR: 8314896: additional clarifications to reversed() default methods' implementation requirements [v2]

2023-10-10 Thread Stuart Marks
> Wording changes to make clear that the scenarios described are merely > examples and are not normative requirements. 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

Re: RFR: 8315850: Improve AbstractMap anonymous Iterator classes [v3]

2023-10-11 Thread Stuart Marks
On Fri, 8 Sep 2023 16:13:16 GMT, Per Minborg wrote: >> This PR proposes to slightly improve some iterators of `AbstractMap`: >> >> * Declare two fields `final` >> * Use distinct classes rather than anonymous classes > > Per Minborg has updated the pull request incrementally with two additional

Integrated: 8314896: additional clarifications to reversed() default methods' implementation requirements

2023-10-11 Thread Stuart Marks
On Mon, 18 Sep 2023 21:12:44 GMT, Stuart Marks wrote: > Wording changes to make clear that the scenarios described are merely > examples and are not normative requirements. This pull request has now been integrated. Changeset: 3f6d0168 Author:Stuart Marks URL:

Re: RFR: 8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java [v3]

2023-10-16 Thread Stuart Marks
On Mon, 16 Oct 2023 17:01:20 GMT, Matthew Donovan wrote: >> This PR refactors the SSLSocketParametersTest by removing >> redundant/unnecessary classes and cleans up the logic around expected >> exceptions. > > Matthew Donovan has updated the pull request incrementally with one > additional com

Re: RFR: 8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java [v2]

2023-10-18 Thread Stuart Marks
On Mon, 16 Oct 2023 11:13:57 GMT, Mark Sheppard wrote: >> Matthew Donovan 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 >> com

Re: RFR: 8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java [v3]

2023-10-18 Thread Stuart Marks
On Tue, 17 Oct 2023 11:33:00 GMT, Matthew Donovan wrote: >> test/lib/jdk/test/lib/Asserts.java line 588: >> >>> 586: } >>> 587: // fail() throws a RuntimeException so this is unreachable. >>> 588: return null; >> >> Hm, this is unfortunate. Even though this method throws

Re: RFR: 8316493: Make immutable maps @ValueBased [v6]

2023-10-18 Thread Stuart Marks
On Wed, 18 Oct 2023 15:24:14 GMT, Per Minborg wrote: >> This PR outlines a solution for making immutable maps `@ValueBased` by >> removing cacheing of certain values in `AbstractMap`. >> >> By removing these caching fields in `AbstractMap`, we can make the immutable >> maps `@ValueBased` and a

Re: RFR: 8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java [v5]

2023-10-18 Thread Stuart Marks
On Wed, 18 Oct 2023 19:05:06 GMT, Matthew Donovan wrote: >> This PR refactors the SSLSocketParametersTest by removing >> redundant/unnecessary classes and cleans up the logic around expected >> exceptions. > > Matthew Donovan has updated the pull request incrementally with one > additional com

Re: Provide thread-safe and concurrent sequenced collections with insertion order?

2023-11-09 Thread Stuart Marks
Hi Sebastian, Regarding the lack of "synchronized" wrappers for Sequenced Collections: the main issue is that they provide only a limited sense of "thread safety" and as such don't add much actual value. Specifically, the synchronized wrappers hold a lock only around invocations of individual

Re: [External] : Re: Provide thread-safe and concurrent sequenced collections with insertion order?

2023-11-14 Thread Stuart Marks
not familiar enough with the implementation of concurrent collections to judge whether my hope is justified. But essentially, my use case would be an LRU-cache that does not use a single exclusion lock to improve concurrent access by a large number of (virtual) threads. Sebastian On Fri,

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref

2023-11-15 Thread Stuart Marks
On Mon, 13 Nov 2023 22:31:16 GMT, Brent Christian wrote: > Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref

2023-11-15 Thread Stuart Marks
On Mon, 13 Nov 2023 22:31:16 GMT, Brent Christian wrote: > Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref

2023-11-15 Thread Stuart Marks
On Mon, 13 Nov 2023 22:31:16 GMT, Brent Christian wrote: > Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref

2023-11-15 Thread Stuart Marks
On Mon, 13 Nov 2023 22:31:16 GMT, Brent Christian wrote: > Classes in the `java.lang.ref` package would benefit from an update to bring > the spec in line with how the VM already behaves. The changes would focus on > _happens-before_ edges at some key points during reference processing. > > A

Re: RFR: 8320532: Remove Thread/ThreadGroup suspend/resume

2023-11-28 Thread Stuart Marks
On Thu, 23 Nov 2023 09:18:44 GMT, Alan Bateman wrote: > The deadlock prone Thread/ThreadGroup suspend/resume were deprecated since > JDK 1.2, deprecated for removal in Java 14, and re-specified/degraded to > throw UnsupportedOperationException unconditionally in Java 19/20. Early in > Java 23

Re: RFR: 8320919: Clarify Locale related system properties [v3]

2023-12-12 Thread Stuart Marks
On Mon, 11 Dec 2023 23:17:01 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/util/Locale.java line 301: >> >>> 299: * is unparsable, it is ignored. The overriding values of other >>> properties are not >>> 300: * checked for syntax or validity and are used directly in the default

Re: RFR: 8320919: Clarify Locale related system properties [v3]

2023-12-12 Thread Stuart Marks
On Mon, 11 Dec 2023 23:20:25 GMT, Naoto Sato wrote: >> This is a doc change to clarify what the `Default Locale` is, and how it is >> established during the system startup using the system properties. Those >> locale-related system properties have existed since the early days of Java, >> but h

Re: RFR: 8321637: Simplify if statement in ArraysSupport::hugeLength

2023-12-18 Thread Stuart Marks
On Sat, 9 Dec 2023 23:19:52 GMT, John Jiang wrote: > It looks the `else-if` and `else` clauses in method > `ArraysSupport::hugeLength` could be simplified by `Math::max`. This change would make the code shorter, but in my opinion, it obscures what's going on. This code tries to be very careful

Re: Omission in javadoc Stream.toArray(): Safe array contract stipulation

2023-12-18 Thread Stuart Marks
is {@code Object}, containing the elements of this stream      */ The more usually used variant taking a function that makes the array has slightly longer javadoc, but it similarly makes no mention whatsoever about the contract stipulation that any implementors must not keep a reference. A snippe

Re: RFR: 6356745: (coll) Add PriorityQueue(Collection, Comparator) [v2]

2023-12-19 Thread Stuart Marks
On Tue, 19 Dec 2023 21:14:40 GMT, Valeh Hajiyev wrote: >> You should update the GitHub PR title to `6356745: (coll) Add >> PriorityQueue(Collection, Comparator)` to match the JBS issue title. >> >> In addition, you will need a [CSR](https://wiki.openjdk.org/display/csr) as >> the bot tells you

Re: RFR: 6356745: (coll) Add PriorityQueue(Collection, Comparator) [v4]

2023-12-19 Thread Stuart Marks
On Tue, 19 Dec 2023 21:17:02 GMT, Valeh Hajiyev wrote: >> This commit addresses the current limitation in the `PriorityQueue` >> implementation, which lacks a constructor to efficiently create a priority >> queue with a custom comparator and an existing collection. In order to >> create such a

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-06 Thread Stuart Marks
On Fri, 6 Sep 2024 19:57:41 GMT, Brent Christian wrote: > From the bug description: > ForceGC would be improved by moving the Reference.reachabilityFence() calls > for 'obj' and 'ref'. > > Reference.reachabilityFence(obj) is currently placed after 'obj' has been set > to null, so effectively d

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-06 Thread Stuart Marks
On Fri, 6 Sep 2024 19:57:41 GMT, Brent Christian wrote: > From the bug description: > ForceGC would be improved by moving the Reference.reachabilityFence() calls > for 'obj' and 'ref'. > > Reference.reachabilityFence(obj) is currently placed after 'obj' has been set > to null, so effectively d

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Stuart Marks
On Mon, 9 Sep 2024 05:01:26 GMT, David Holmes wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 82: >> >>> 80: PhantomReference ref = new PhantomReference<>(obj, >>> queue); >>> 81: Reference.reachabilityFence(obj); >>> 82: obj = null; >> >> You're right to questio

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Stuart Marks
On Mon, 9 Sep 2024 16:12:02 GMT, Stuart Marks wrote: >> The reason for the explicit reference and RF, as I recall, is to guard >> against the allocation of the new object being elided entirely, with the >> `PhantomReference` constructor being passed null (or itself being

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC [v2]

2024-09-10 Thread Stuart Marks
On Tue, 10 Sep 2024 19:23:16 GMT, Brent Christian wrote: >> From the bug description: >> ForceGC would be improved by moving the Reference.reachabilityFence() calls >> for 'obj' and 'ref'. >> >> Reference.reachabilityFence(obj) is currently placed after 'obj' has been >> set to null, so effect

Re: RFR: JDK-8325189: Enable this-escape javac warning in java.base

2024-02-05 Thread Stuart Marks
On Fri, 2 Feb 2024 23:36:41 GMT, Joe Darcy wrote: > After the "this-escape" lint warning was added to javac (JDK-8015831), the > base module was not updated to be able to compile with this warning enabled. > This PR makes the necessary changes to allow the base module to build with > the warni

Re: RFR: 8324573: HashMap::putAll should resize to sum of both map sizes [v4]

2024-02-07 Thread Stuart Marks
On Fri, 2 Feb 2024 17:38:13 GMT, Joshua Cao wrote: >> This change mirrors what we did for ConcurrentHashMap in >> https://github.com/openjdk/jdk/pull/17116. When we add all entries from one >> map to anther, we should resize that map to the size of the sum of both maps. >> >> I used the comman

Re: RFR: 8324573: HashMap::putAll should resize to sum of both map sizes [v4]

2024-02-08 Thread Stuart Marks
addresses fairly directly the essence of the change >> being discussed here. I think it's still applicable; the current code in >> putMapEntries() compares `m.size()` to `threshold` in deciding whether to >> resize immediately. We're not constrained by a 20-year-ol

Re: RFR: 8325679: Optimize ArrayList subList sort

2024-02-12 Thread Stuart Marks
On Mon, 12 Feb 2024 22:52:51 GMT, Attila Szegedi wrote: > Somewhat surprisingly, `ArrayList$Sublist.sort()` is not specialized and will > thus fall back to slower default method of `List.sort()` instead of sorting a > range of the array in-place in its backing root `ArrayList`. > > This doesn

Re: RFR: JDK-8323760 putIfAbsent documentation conflicts with itself [v2]

2024-02-14 Thread Stuart Marks
On Tue, 13 Feb 2024 17:11:05 GMT, John Hendrikx wrote: >> Update the documentation for `@return` tag of `putIfAbsent` to match the >> main description. `putIfAbsent` uses the same wording as `put` for its >> `@return` tag, but that is incorrect. `putIfAbsent` never returns the >> **previous**

Re: RFR: 8325679: Optimize ArrayList subList sort

2024-02-14 Thread Stuart Marks
On Mon, 12 Feb 2024 23:37:59 GMT, Jim Laskey wrote: >> Somewhat surprisingly, `ArrayList$Sublist.sort()` is not specialized and >> will thus fall back to slower default method of `List.sort()` instead of >> sorting a range of the array in-place in its backing root `ArrayList`. >> >> This does

Re: RFR: 8325679: Optimize ArrayList subList sort

2024-02-14 Thread Stuart Marks
On Mon, 12 Feb 2024 22:52:51 GMT, Attila Szegedi wrote: > Somewhat surprisingly, `ArrayList$Sublist.sort()` is not specialized and will > thus fall back to slower default method of `List.sort()` instead of sorting a > range of the array in-place in its backing root `ArrayList`. > > This doesn

Re: CFV: New Core Libraries Group Member: Raffaello Giulietti

2024-02-15 Thread Stuart Marks
Vote: yes On 2/13/24 12:25 PM, Brian Burkhalter wrote: I hereby nominate Raffaello Giulietti to Membership in the Core Libraries Group. Raffaello has been working in the Core Library team at Oracle since April, 2022. He has authored more than 50 contributions to OpenJDK in a number of areas i

CFV: New Core Libraries Group Member: Viktor Klang

2024-02-19 Thread Stuart Marks
I hereby nominate Viktor Klang [6] to Membership in the Core Libraries Group [4]. Viktor has been a member of the Java team in Oracle since 2022, and he is currently a Committer on the JDK project. Viktor has led JEP 461 [1], an enhancement to the Streams API to support new intermediate stre

Result: New Core Libraries Group Member: Viktor Klang

2024-03-05 Thread Stuart Marks
The vote for Viktor Klang [1] is now closed. Yes: 9 Veto: 0 Abstain: 0 According to the Bylaws definition of Lazy Consensus, this is sufficient to approve the nomination. s'marks [1] https://mail.openjdk.org/pipermail/core-libs-dev/2024-February/119401.html

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v13]

2024-03-16 Thread Stuart Marks
On Thu, 14 Mar 2024 23:23:07 GMT, Brent Christian wrote: >> Classes in the `java.lang.ref` package would benefit from an update to bring >> the spec in line with how the VM already behaves. The changes would focus on >> _happens-before_ edges at some key points during reference processing. >>

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v13]

2024-03-16 Thread Stuart Marks
On Wed, 31 Jan 2024 01:13:18 GMT, Brent Christian wrote: >> src/java.base/share/classes/java/lang/ref/package-info.java line 109: >> >>> 107: * >>> 108: * The clearing of a reference by the garbage collector >>> happens-before >>> 109: * the garbage collector enqueues the reference. >> >> I

Re: RFR: 8314480: Memory ordering spec updates in java.lang.ref [v13]

2024-03-19 Thread Stuart Marks
On Tue, 19 Mar 2024 22:19:50 GMT, David Holmes wrote: >> In fact, it appears as if the problem is with the use of "any", which is >> universal in strength, whereas the intention here is existential in strength >> (as suggested by. my wording). Indeed, you might achieve the same effect by >> re

Re: CFV: New Core Libraries Group Member: Per-Ake Minborg

2024-03-20 Thread Stuart Marks
Vote: yes On 3/19/24 8:19 AM, Daniel Fuchs wrote: Hi, I hereby nominate Per-Ake Minborg (pminborg) [1] to Membership in the Core Libraries Group [4]. Per-Ake is an OpenJDK Reviewer, a committer in the Leyden and Panama projects, and a member of Oracle’s Java Core Libraries team. Per-Ake has

Re: RFR: JDK-8323760 putIfAbsent documentation conflicts with itself [v3]

2024-03-20 Thread Stuart Marks
On Wed, 14 Feb 2024 20:46:17 GMT, John Hendrikx wrote: >> Update the documentation for `@return` tag of `putIfAbsent` to match the >> main description. `putIfAbsent` uses the same wording as `put` for its >> `@return` tag, but that is incorrect. `putIfAbsent` never returns the >> **previous**

Re: RFR: JDK-8323760 clarify specification of Map::putIfAbsent return value [v3]

2024-03-26 Thread Stuart Marks
On Wed, 14 Feb 2024 20:46:17 GMT, John Hendrikx wrote: >> Update the documentation for `@return` tag of `putIfAbsent` to match the >> main description. `putIfAbsent` uses the same wording as `put` for its >> `@return` tag, but that is incorrect. `putIfAbsent` never returns the >> **previous**

Re: RFR: 8305457: Implement java.io.IO [v3]

2024-05-07 Thread Stuart Marks
On Tue, 7 May 2024 19:46:18 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merge

Re: RFR: 8305457: Implement java.io.IO [v3]

2024-05-07 Thread Stuart Marks
On Tue, 7 May 2024 22:12:55 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/io/IO.java line 37: >> >>> 35: * is {@code null}; otherwise, the effect is as if a similarly-named >>> method >>> 36: * had been called on that console. >>> 37: * >> >> Add a note here on encoding (chara

Re: RFR: 8305457: Implement java.io.IO [v3]

2024-05-08 Thread Stuart Marks
herwise, this package clause applies: > > * Unless otherwise noted, passing a {@code null} argument to a > constructor or > * method in any class or interface in this package will cause a > * {@code NullPointerException} to be thrown. > ... > package java.io

Re: RFR: 8305457: Implement java.io.IO [v3]

2024-05-08 Thread Stuart Marks
not > specified in terms of `printf` or `format`. Thus, we cannot reduce `println` > to, say, `printf("%s%n", obj)`, leaning on `Formatter`'s definition of `%n`: > > 'n' line separator The result is the platform-specific line > separator > >

Re: RFR: 8305457: Implement java.io.IO [v3]

2024-05-08 Thread Stuart Marks
On Wed, 8 May 2024 18:25:50 GMT, Pavel Rappo wrote: >> Most of these are defined in terms of `String.valueOf(Object)` which if >> passed a null reference will return the String object containing `null`. So >> no, I don't think NPE should be thrown. It might be worth mentioning this >> explicit

Re: RFR: 8331876: JFR: Move file read and write events to java.base [v3]

2024-05-09 Thread Stuart Marks
On Thu, 9 May 2024 14:59:34 GMT, Erik Gahlin wrote: >> src/java.base/share/classes/java/io/FileInputStream.java line 63: >> >>> 61: private static final int DEFAULT_BUFFER_SIZE = 8192; >>> 62: >>> 63: // Flag that determines if file reads should be traced by JFR >> >> It could be good

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-09 Thread Stuart Marks
On Thu, 9 May 2024 18:27:08 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merge

Re: RFR: 8331876: JFR: Move file read and write events to java.base [v3]

2024-05-13 Thread Stuart Marks
On Sun, 12 May 2024 07:27:26 GMT, Alan Bateman wrote: >> If an event class is loaded before JFR is started, the event class needs to >> be retransformed, but if it is loaded later, we can add instrumentation on >> class load and avoid the retransformation. More happens when an event class >> i

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v3]

2024-05-13 Thread Stuart Marks
On Mon, 13 May 2024 17:06:32 GMT, Naoto Sato wrote: >> Making sure `restoreEcho` correctly reflects the state in the shutdown >> thread, which differs from the application's thread that issues the >> `readPassword()` method. > > Naoto Sato has updated the pull request incrementally with one add

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v4]

2024-05-13 Thread Stuart Marks
On Mon, 13 May 2024 21:32:18 GMT, Naoto Sato wrote: >> Making sure `restoreEcho` correctly reflects the state in the shutdown >> thread, which differs from the application's thread that issues the >> `readPassword()` method. > > Naoto Sato has updated the pull request incrementally with one add

Re: RFR: 8305457: Implement java.io.IO [v9]

2024-05-13 Thread Stuart Marks
On Mon, 13 May 2024 09:56:35 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merg

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v4]

2024-05-14 Thread Stuart Marks
On Mon, 13 May 2024 21:32:18 GMT, Naoto Sato wrote: >> Making sure `restoreEcho` correctly reflects the state in the shutdown >> thread, which differs from the application's thread that issues the >> `readPassword()` method. > > Naoto Sato has updated the pull request incrementally with one add

Re: RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v4]

2024-05-14 Thread Stuart Marks
On Mon, 13 May 2024 21:32:18 GMT, Naoto Sato wrote: >> Making sure `restoreEcho` correctly reflects the state in the shutdown >> thread, which differs from the application's thread that issues the >> `readPassword()` method. > > Naoto Sato has updated the pull request incrementally with one add

Re: RFR: 8305457: Implement java.io.IO [v9]

2024-05-14 Thread Stuart Marks
On Tue, 14 May 2024 14:31:52 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/io/IO.java line 98: >> >>> 96: * or if an I/O error occurs >>> 97: */ >>> 98: public static String readln(String prompt) { >> >> Did we consider Optional here? Maybe that is to

Re: RFR: 8331224: ClassCastException in ObjectInputStream hides ClassNotFoundException

2024-05-16 Thread Stuart Marks
On Wed, 1 May 2024 18:43:21 GMT, Roger Riggs wrote: > The issue reported a ClassCastException "cannot assign instance of > java.util.CollSer to field of type java.util.Map" > while deserializing an object referring to an immutable Map that contained a > reference to a class that was not availab

<    1   2   3   4   5   6   >