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

2023-11-15 Thread Sebastian Fischer
choice as an example demonstrating the new interfaces for sequenced collections together with virtual threads. But my main interest (that's why I asked here) is in understanding design considerations for the Java core libraries so I can explain them to others. When preparing the examp

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

2023-11-14 Thread Stuart Marks
Nov 10, 2023 at 1:03 AM Stuart Marks wrote: 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.

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

2023-11-10 Thread Sebastian Fischer
, > > 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 > onl

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

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

2023-11-02 Thread Sebastian Fischer
Hello. I am new to this list so might have missed previous discussion about this but could not find what I was looking for in the archives. The Sequenced collections JEP adds the following static methods to java.util.Collections. - unmodifiableSequencedCollection - unmodifiableSequencedSet

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Hollis Waite
On Fri, 21 Jul 2023 16:48:12 GMT, Stuart Marks wrote: > ListIterator fuses three different concepts: the ability to traverse forwards > and > backwards, the ability to mutate the underlying List at the current location > (add/remove/set), and the index of the current location. Which of these is

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Pavel Rappo
On Mon, 24 Apr 2023 21:39:43 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > 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 

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Rémi Forax
On Fri, 21 Jul 2023 16:19:35 GMT, Hollis Waite wrote: > a SequencedCollection is backed by a doubly linked list. It's up to the user > to understand performance implications. Beware of this kind of thinking, implementations of collections in the JDK change. Many hashtable implementations in o

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-SequencedCollections >> - Optimizations for Reverse

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Pavel Rappo
On Mon, 24 Apr 2023 21:39:43 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > 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 

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Hollis Waite
On Mon, 24 Apr 2023 21:39:43 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > 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 

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Pavel Rappo
On Fri, 21 Jul 2023 11:16:11 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-SequencedCollections >> - Optimizations for Reverse

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Pavel Rappo
On Fri, 21 Jul 2023 11:16:11 GMT, Hollis Waite wrote: > It'd be convenient if SequencedCollection overrode Iterable.iterator() to > return a ListIterator. That would make it simpler to derive a List from > LinkedHashMap.values(). What stops you from deriving a list from LinkedHashMap.values()

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Rémi Forax
On Fri, 21 Jul 2023 11:16:11 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-SequencedCollections >> - Optimizations for Reverse

Re: RFR: 8266571: Sequenced Collections [v12]

2023-07-21 Thread Hollis Waite
On Mon, 24 Apr 2023 21:39:43 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > 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 

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: 8311517: Adapt ArrayList Javadoc for sequenced collections

2023-07-20 Thread Daniel Schmid
I could create a PR for this if wanted. I would suggest changing > The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, adding n elements requires O(n) time. All of the other operations run in line

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

2023-07-13 Thread Stuart Marks
d2e9f3c185414dcd7f481668 Stats: 30 lines in 6 files changed: 18 ins; 4 del; 8 mod 8306785: fix deficient spliterators for Sequenced Collections Reviewed-by: rriggs Backport-of: 743e8b8e0a9fe032a0dd652a4fef1f761af66595 - PR: https://git.openjdk.org/jdk21/pull/118

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

2023-07-13 Thread Roger Riggs
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. > > The commit bei

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

Integrated: 8306785: fix deficient spliterators for Sequenced Collections

2023-07-12 Thread Stuart Marks
ngeset: 743e8b8e Author:Stuart Marks URL: https://git.openjdk.org/jdk/commit/743e8b8e0a9fe032a0dd652a4fef1f761af66595 Stats: 30 lines in 6 files changed: 18 ins; 4 del; 8 mod 8306785: fix deficient spliterators for Sequenced Collections Reviewed-by: psandoz - PR: https://git.openjdk.org/jdk/pull/14854

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

2023-07-12 Thread Paul Sandoz
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 be done later. I'

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 be done later. I'

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: Adapt ArrayList Javadoc for sequenced collections

2023-07-05 Thread Roger Riggs
Hi Daniel, Core-libs-dev is indeed the correct alias for this documentation issue. Create an issue to track: JDK-8311517 Regards, Roger On 7/1/23 3:35 PM, Daniel Schmid wrote: The JEP for sequenced collection (https://openjdk.org/jeps/431) would

Adapt ArrayList Javadoc for sequenced collections

2023-06-10 Thread Daniel Schmid
Dear members of the core-libs-dev mailing list, The JEP for sequenced collection (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 operations run i

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Maurizio Cimadamore
ene and it failed, but not for sequenced collections reasons. It was more some tests calling Runtime#runFinalization(). Thanks Maurizio

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Maurizio Cimadamore
On 17/05/2023 08:58, Uwe Schindler wrote: If we would change to Java 21 as compilation target, we may need to adapt our code. I believe that would be an experiment worth doing (if you can!), and report back if you find any compilation problems. E.g. using --release 17 effectively shields L

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Joe Darcy
On 5/17/2023 7:07 AM, Ethan McCue wrote: > if they have setup their projects correctly. Can you be more clear about what "setup their projects correctly" means? If you are referring to usage of --release, you seem to be making a pretty strong argument that this will not be the case. Use of

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Ethan McCue
e serious source-incompatibility issue that I would always > report to OpenJDK bug tracker: During testing Java 20 we were trapped by a > compiler change that caused a source incompatibility (which was reverted, > see https://bugs.openjdk.org/browse/JDK-8299416). So not even passing > &

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-17 Thread Uwe Schindler
ler changed its semantics. This is in my opinion a breaking issue because it prevents code from compiling! The changes in sequenced collections should not be a too big problem for the community if they have setup their projects correctly. Uwe P.S.: To be honest: I tried to pass "--release

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-16 Thread Alan Snyder
I have not seen any explanation of how this issue is going to be resolved. Given the new information, shouldn’t the CSR review be reopened to re-evaluate the cost/benefit analysis?

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-11 Thread Joseph D. Darcy
ce problem. Rémi - Original Message ----- From: "Stuart Marks" To: "Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a source compatible change Hi Rémi, Thanks for tryi

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Maurizio Cimadamore
inal List> list = Stream.of(nestedDequeue, nestedList).toList(); This one is cool because no 'var' is involved and using collect(Collectors.toList()) instead of toList() solves the inference problem. Rémi - Original Message ----- From: "Stuart Marks" To: "Remi Forax&q

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread forax
. Rémi > From: "joe darcy" > To: "Ethan McCue" , "Raffaello Giulietti" > > Cc: "Remi Forax" , "Stuart Marks" > , > "core-libs-dev" > Sent: Friday, May 5, 2023 4:38:16 AM > Subject: Re: The introduction of Sequenced

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Tagir Valeev
ist()) instead of toList() solves the inference problem. > > Rémi > > - Original Message ----- > > From: "Stuart Marks" > > To: "Remi Forax" > > Cc: "core-libs-dev" > > Sent: Tuesday, May 2, 2023 2:44:28 AM > > Subject: Re: The

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-05 Thread Jens Lideström
I want contribute an observation of a tangential fact about this example. This might be interesting reminder in a discussion of the tricky parts of type inference. ### The fact The reason that this example does not compile with Sequenced collections is a limitation in the type inference

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Ethan McCue
For those who are tracking but didn't click through to find it, here was the writeup of the compatibility analysis for sequenced collections as of 9/20/22. https://bugs.openjdk.org/secure/attachment/100811/compatibility-20220920.html Bug page: https://bugs.openjdk.org/browse/JDK-8266572

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Joseph D. Darcy
"Stuart Marks" To: "Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a source compatible change Hi Rémi, Thanks for trying out the latest build! I'll make sure this gets mentione

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread -
final List> list = Stream.of(nestedDequeue, >> > nestedList).toList(); >> > >> > This one is cool because no 'var' is involved and using >> > collect(Collectors.toList()) instead of toList() solves the inference >> > problem. >> >

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Joseph D. Darcy
is involved and using collect(Collectors.toList()) instead of toList() solves the inference problem. > > Rémi > > - Original Message - >> From: "Stuart Marks" >> To: "Remi Forax" >> Cc: "core-libs-dev&

Re: [External] : The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Alan Snyder
“bug” in type inference, I can’t help but wonder whether a more flexible type system could handle this change without breaking source compatibility. If so, then a case could be made to delay the introduction of Sequenced Collections until the type system can handle it without source

Re: [External] : The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Stuart Marks
The introduction of Sequenced Collections in JDK 21+20 did make a difference in this specific case. One can compile Rémi's example on JDK 21+19 successfully, but it will fail on JDK 21+20. Here's Rémi's example:     public static void m(List>> factories) {     }     pu

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Ethan McCue
t; > nestedList.add("F"); > > > > final List> list = Stream.of(nestedDequeue, > nestedList).toList(); > > > > This one is cool because no 'var' is involved and using > collect(Collectors.toList()) instead of toList() solves the inference > pr

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-04 Thread Raffaello Giulietti
"Stuart Marks" To: "Remi Forax" Cc: "core-libs-dev" Sent: Tuesday, May 2, 2023 2:44:28 AM Subject: Re: The introduction of Sequenced collections is not a source compatible change Hi Rémi, Thanks for trying out the latest build! I'll make sure this

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-03 Thread forax
lves the inference problem. Rémi - Original Message - > From: "Stuart Marks" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Tuesday, May 2, 2023 2:44:28 AM > Subject: Re: The introduction of Sequenced collections is not a source > compa

Re: The introduction of Sequenced collections is not a source compatible change

2023-05-01 Thread Stuart Marks
Hi Rémi, Thanks for trying out the latest build! I'll make sure this gets mentioned in the release note for Sequenced Collections. We'll also raise this issue when we talk about this feature in the Quality Outreach program. s'marks On 4/29/23 3:46 AM, Remi Forax wrote

The introduction of Sequenced collections is not a source compatible change

2023-04-29 Thread Remi Forax
I've several repositories that now fails to compile with the latest jdk21, which introduces sequence collections. The introduction of a common supertype to existing collections is *not* a source compatible change because of type inference. Here is a simplified example: public static void m(L

Re: RFR: 8266571: Sequenced Collections [v12]

2023-04-25 Thread Chen Liang
On Mon, 24 Apr 2023 21:39:43 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > 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 

Integrated: 8266571: Sequenced Collections

2023-04-25 Thread Stuart Marks
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. This pull request has now been integrated. Changeset: 17ce0976 Author:Stuart Marks URL: https://git.openjdk.org/jdk/commit/17ce0976e442d5fabb14daed40fa9a768989f02e Stats: 7

Re: RFR: 8266571: Sequenced Collections [v12]

2023-04-25 Thread Alan Bateman
On Mon, 24 Apr 2023 21:39:43 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > 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 

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-25 Thread Pavel Rappo
On Thu, 20 Apr 2023 16:19:05 GMT, Stuart Marks wrote: >>> I didn't know about the need to specify `@throws` in order to generate the >>> throws-clauses in the docs. >> >> You need to explicitly inherit `@throws` only for exceptions that aren't >> mentioned in the `throws` clause. >> >>> As a

Re: RFR: 8266571: Sequenced Collections [v12]

2023-04-24 Thread Stuart Marks
On Fri, 24 Mar 2023 22:08:18 GMT, Tagir F. Valeev 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-SequencedCollections >> - Optimizations for Reve

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-24 Thread Stuart Marks
On Thu, 30 Mar 2023 09:56:58 GMT, Tagir F. Valeev wrote: >> @liach >> >> I understand that you're suggesting adding various default implementations >> in order to make it easier for people to bring up implementations of >> SequencedCollections. However, adding default implementations to >> S

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-24 Thread Stuart Marks
On Sat, 22 Apr 2023 07:56:03 GMT, Nir Lisker wrote: >> Might not work if this map is concurrent. If isEmpty() returns false but >> then the map is emptied before the subsequent calls, next() might throw >> NSEE. The concurrent maps' iterators make sure to cache the element if >> hasNext() has

Re: RFR: 8266571: Sequenced Collections [v12]

2023-04-24 Thread Stuart Marks
On Fri, 24 Mar 2023 22:06:06 GMT, Tagir F. Valeev 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-SequencedCollections >> - Optimizations for Reve

Re: RFR: 8266571: Sequenced Collections [v10]

2023-04-24 Thread Stuart Marks
On Sat, 22 Apr 2023 09:33:57 GMT, ExE Boss wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Wording tweaks to SequencedMap / NavigableMap. >> - Change "The implementation in this class" to "... interface." > > sr

Re: RFR: 8266571: Sequenced Collections [v12]

2023-04-24 Thread Stuart Marks
> PR for Sequenced Collections implementation. 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-SequencedCollections - Optimizations for ReverseOrderLi

Re: RFR: 8266571: Sequenced Collections [v11]

2023-04-24 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Optimizations for ReverseOrderListView; check indexes in reversed domain. - Changes: - all: https://git.openjdk.org/

Re: RFR: 8266571: Sequenced Collections [v10]

2023-04-22 Thread ExE Boss
On Fri, 21 Apr 2023 22:33:13 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with two additional > commits since the last revision: > > - Wording tweaks to SequencedMap / Navigable

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-22 Thread ExE Boss
On Wed, 19 Apr 2023 02:43:53 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/LinkedHashSet.java line 297: >> >>> 295: */ >>> 296: public SequencedSet reversed() { >>> 297: class ReverseLinkedHashSetView extends AbstractSet >>> implements SequencedSet { >> >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-22 Thread Nir Lisker
On Fri, 21 Apr 2023 22:14:58 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/SequencedMap.java line 152: >> >>> 150: var it = entrySet().iterator(); >>> 151: return it.hasNext() ? Map.Entry.copyOf(it.next()) : null; >>> 152: } >> >> Would is be better to fi

Re: RFR: 8266571: Sequenced Collections [v10]

2023-04-21 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with two additional commits since the last revision: - Wording tweaks to SequencedMap / NavigableMap. - Change "The implementation in this class" to "... interface."

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-21 Thread Stuart Marks
On Thu, 20 Apr 2023 12:30:52 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >> - Fi

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-21 Thread Stuart Marks
On Thu, 20 Apr 2023 12:09:52 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >> - Fi

Re: RFR: 8266571: Sequenced Collections [v9]

2023-04-20 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with one additional commit since the last revision: Delegate more methods in the views of ReverseOrderSortedMapView. - Changes: - all: https://git.openjdk.org/jdk/pull/7

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Stuart Marks
On Thu, 20 Apr 2023 09:03:03 GMT, Pavel Rappo wrote: >> @pavelrappo Aggh. >> >>> I guess, this PR has converged enough for us to discuss some trivial stuff; >>> so here it goes. >> >> All this "trivial" stuff is generating a lot of work! :-) Well, no big deal, >> Joe D still has more CSR

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-20 Thread Nir Lisker
On Thu, 20 Apr 2023 04:19:55 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with four additional > commits since the last revision: > > - Add missing @throws and @since tags. > -

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Nir Lisker
On Wed, 19 Apr 2023 18:22:28 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/SequencedMap.java line 110: >> >>> 108: * {@code Entry} thus obtained will update a mapping in the underlying >>> map, or whether >>> 109: * it will throw an exception, or whether changes to the und

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Pavel Rappo
On Thu, 20 Apr 2023 04:13:57 GMT, Stuart Marks wrote: > I didn't know about the need to specify `@throws` in order to generate the > throws-clauses in the docs. You need to explicitly inherit `@throws` only for exceptions that aren't mentioned in the `throws` clause. > As an aside, I note th

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-20 Thread Nir Lisker
On Wed, 19 Apr 2023 14:41:59 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
On Fri, 24 Mar 2023 22:16:54 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
On Fri, 24 Mar 2023 22:13:29 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
On Fri, 24 Mar 2023 22:01:11 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Add missing @throws and @since tags. >> - Convert code samples to snippets. >> - Various editorial changes. >>

Re: RFR: 8266571: Sequenced Collections [v8]

2023-04-19 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with four additional commits since the last revision: - Add missing @throws and @since tags. - Convert code samples to snippets. - Various editorial changes. - Fix up toArray(T[])

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 10:29:48 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java >> line 409: >> >>> 407: * {@inheritDoc} >>> 408: */ >>> 409: public E getFirst() { >> >> Javadoc will automatically copy the specification from the

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 14:41:59 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 12:27:41 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 14:19:01 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 10:06:38 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 09:43:44 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Stuart Marks
On Wed, 19 Apr 2023 05:51:11 GMT, Nir Lisker wrote: >> Stuart Marks has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove unnecessary 'final' from a couple places. >> - Clarify ordering of Collection.addAll and Map.putAll; add link

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Nir Lisker
On Wed, 19 Apr 2023 03:37:05 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with three additional > commits since the last revision: > > - Remove unnecessary 'final' fro

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-19 Thread Pavel Rappo
On Wed, 19 Apr 2023 04:36:28 GMT, Chen Liang wrote: > Javadoc will automatically copy the specification from the overridden method, > so the javadoc block is not necessary and can be replaced by an `@Override` > to indicate inheritance. I guess, this PR has converged enough for us to discuss s

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-18 Thread Chen Liang
On Wed, 19 Apr 2023 03:37:05 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with three additional > commits since the last revision: > > - Remove unnecessary 'final' fro

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-18 Thread Chen Liang
On Wed, 19 Apr 2023 03:37:05 GMT, Stuart Marks wrote: >> PR for Sequenced Collections implementation. > > Stuart Marks has updated the pull request incrementally with three additional > commits since the last revision: > > - Remove unnecessary 'final' fro

Re: RFR: 8266571: Sequenced Collections [v7]

2023-04-18 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with three additional commits since the last revision: - Remove unnecessary 'final' from a couple places. - Clarify ordering of Collection.addAll and Map.putAll; add links to

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-18 Thread Stuart Marks
On Sat, 25 Mar 2023 07:25:33 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > > src/java.base/share/classes/java/util/LinkedHas

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-18 Thread Stuart Marks
On Thu, 30 Mar 2023 09:23:04 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/SequencedC

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-18 Thread Stuart Marks
On Sat, 25 Mar 2023 07:19:49 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > > src/java.base/share/classes/java/util/Collectio

Re: RFR: 8266571: Sequenced Collections [v6]

2023-04-18 Thread Stuart Marks
On Fri, 24 Mar 2023 21:57:40 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - Clarify LHM and LHS specs regarding semantics of reverse-ordered views. >> - Remove special-cases for reversed L

Re: RFR: 8266571: Sequenced Collections [v6]

2023-04-18 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with four additional commits since the last revision: - Clarify LHM and LHS specs regarding semantics of reverse-ordered views. - Remove special-cases for reversed LHM and LHS putAll and

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-17 Thread Stuart Marks
On Thu, 30 Mar 2023 11:33:14 GMT, Chen Liang wrote: >> In the JEP: >>> A sequenced collection supports common operations at either end, and it >>> supports processing the elements from first to last and from last to first >>> (i.e., forward and reverse). >> >>> The reverse-ordered view enables

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-17 Thread Stuart Marks
On Sat, 25 Mar 2023 07:34:51 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > > src/java.base/share/classes/java/util/ReverseOr

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-17 Thread Stuart Marks
On Sat, 25 Mar 2023 07:28:46 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > > src/java.base/share/classes/java/util/LinkedLis

Re: RFR: 8266571: Sequenced Collections [v2]

2023-04-17 Thread Stuart Marks
On Sat, 25 Mar 2023 07:15:16 GMT, Rémi Forax wrote: >> Stuart Marks has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - More specification tweaks. >> - Add simple overrides to ArrayList. > > src/java.base/share/classes/java/util/Collectio

Re: RFR: 8266571: Sequenced Collections [v5]

2023-04-17 Thread Stuart Marks
On Thu, 30 Mar 2023 09:50:51 GMT, Tagir F. Valeev wrote: >> src/java.base/share/classes/java/util/LinkedHashMap.java line 1197: >> >>> 1195: >>> 1196: public V computeIfAbsent(K key, Function>> V> mappingFunction) { >>> 1197: return base.computeIfAbsent(key, mappingFunction)

Re: RFR: 8266571: Sequenced Collections [v5]

2023-04-17 Thread Stuart Marks
On Tue, 28 Mar 2023 01:28:16 GMT, Stuart Marks wrote: >> src/java.base/share/classes/java/util/LinkedHashMap.java line 1123: >> >>> 1121: >>> 1122: public V put(K key, V value) { >>> 1123: return base.put(key, value); >> >> Why `put()` simply delegates to `base.put()` while

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-14 Thread Stuart Marks
On Thu, 30 Mar 2023 09:20:16 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/SequencedC

Re: RFR: 8266571: Sequenced Collections [v4]

2023-04-14 Thread Stuart Marks
On Thu, 30 Mar 2023 09:39:14 GMT, Tagir F. Valeev wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Simplify handling of cached keySet, values, and entrySet views. > > src/java.base/share/classes/java/util/LinkedHash

  1   2   >