Re: [External] : Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread forax
> De: "John Rose" > À: "Remi Forax" > Cc: "Peter Levart" , "Rémi Forax" > , "core-libs-dev" > Envoyé: Vendredi 4 Juin 2021 02:05:41 > Objet: Re: [External] : Re: RFR: 8199318: add idempotent copy operation for > Map.Entry

Re: [External] : Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread John Rose
m>>, "Rémi Forax" mailto:fo...@openjdk.java.net>>, "core-libs-dev" mailto:core-libs-dev@openjdk.java.net>> Envoyé: Jeudi 3 Juin 2021 22:51:28 Objet: Re: RFR: 8199318: add idempotent copy operation for Map.Entry ... interface ComparableRecord> exte

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread forax
> De: "John Rose" > À: "Remi Forax" < fo...@univ-mlv.fr > > Cc: "Peter Levart" < peter.lev...@gmail.com >, "Rémi Forax" < > fo...@openjdk.java.net >, "core-libs-dev" < core-libs-dev@openjdk.java.net > > En

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread forax
> De: "John Rose" > À: "Remi Forax" > Cc: "Peter Levart" , "Rémi Forax" > , "core-libs-dev" > Envoyé: Jeudi 3 Juin 2021 22:51:28 > Objet: Re: RFR: 8199318: add idempotent copy operation for Map.Entry > On Jun 3, 2021, at

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread John Rose
On Jun 3, 2021, at 12:46 PM, Remi Forax mailto:fo...@univ-mlv.fr>> wrote: I kind of regret that the compiler does not provide automatically an implementation of compareTo if the record implements Comparable. People sucks at writing compareTo and the resulting bugs are hard to find/reproduce. T

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread Remi Forax
- Mail original - > De: "Peter Levart" > À: "Rémi Forax" , "core-libs-dev" > > Envoyé: Jeudi 3 Juin 2021 20:49:05 > Objet: Re: RFR: 8199318: add idempotent copy operation for Map.Entry > On 02/06/2021 19:24, Rémi Forax wrote: >> I f

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-03 Thread Peter Levart
On 02/06/2021 19:24, Rémi Forax wrote: I foolishly hoped that nobody would subclass a class with `Immutable` in its name, oh boy i was wrong:) There's nothing wrong in subclassing an immutable class. As long as the subclass keeps being immutable. Was it subclassed and made mutable by that?

Re: RFR: 8199318: add idempotent copy operation for Map.Entry [v2]

2021-06-03 Thread Daniel Fuchs
On Wed, 2 Jun 2021 17:54:06 GMT, Stuart Marks wrote: >> I'm fixing this along with a couple intertwined issues. >> >> 1. Add Map.Entry::copyOf as an idempotent copy operation. >> >> 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not >> really immutable) but that subcl

Re: RFR: 8199318: add idempotent copy operation for Map.Entry [v2]

2021-06-02 Thread Stuart Marks
On Wed, 2 Jun 2021 18:07:55 GMT, Daniel Fuchs wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Tiny editorial tweaks. > > src/java.base/share/classes/java/util/Map.java line 396: > >> 394: >> 395: /** >> 396:

Re: RFR: 8199318: add idempotent copy operation for Map.Entry [v2]

2021-06-02 Thread Paul Sandoz
On Wed, 2 Jun 2021 17:54:06 GMT, Stuart Marks wrote: >> I'm fixing this along with a couple intertwined issues. >> >> 1. Add Map.Entry::copyOf as an idempotent copy operation. >> >> 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not >> really immutable) but that subcl

Re: RFR: 8199318: add idempotent copy operation for Map.Entry [v2]

2021-06-02 Thread Daniel Fuchs
On Wed, 2 Jun 2021 17:54:06 GMT, Stuart Marks wrote: >> I'm fixing this along with a couple intertwined issues. >> >> 1. Add Map.Entry::copyOf as an idempotent copy operation. >> >> 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not >> really immutable) but that subcl

Re: RFR: 8199318: add idempotent copy operation for Map.Entry [v2]

2021-06-02 Thread Stuart Marks
> I'm fixing this along with a couple intertwined issues. > > 1. Add Map.Entry::copyOf as an idempotent copy operation. > > 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not > really immutable) but that subclasses can be modifiable. > > 3. Clarify some confusing, hist

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-02 Thread Rémi Forax
On Wed, 2 Jun 2021 17:12:21 GMT, Stuart Marks wrote: > A quick search reveals that Guava has a public subclass of > SimpleImmutableEntry: > https://guava.dev/releases/30.1.1-jre/api/docs/com/google/common/cache/RemovalNotification.html >There are possibly others. It doesn't seem worth the incom

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-02 Thread Stuart Marks
On Wed, 2 Jun 2021 07:35:25 GMT, Rémi Forax wrote: > i wonder if we should not declare SimpleImmutableEntry final, while it's not > a backward compatible change, > it's may be better on the long term because SimpleImmutableEntry is already > used as an immutable type, > so instead of documentin

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-02 Thread Alan Bateman
On Wed, 2 Jun 2021 00:39:25 GMT, Stuart Marks wrote: > I'm fixing this along with a couple intertwined issues. > > 1. Add Map.Entry::copyOf as an idempotent copy operation. > > 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not > really immutable) but that subclasses

Re: RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-02 Thread Rémi Forax
On Wed, 2 Jun 2021 00:39:25 GMT, Stuart Marks wrote: > I'm fixing this along with a couple intertwined issues. > > 1. Add Map.Entry::copyOf as an idempotent copy operation. > > 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not > really immutable) but that subclasses

RFR: 8199318: add idempotent copy operation for Map.Entry

2021-06-01 Thread Stuart Marks
I'm fixing this along with a couple intertwined issues. 1. Add Map.Entry::copyOf as an idempotent copy operation. 2. Clarify that AbstractMap.SimpleImmutableEntry is itself unmodifiable (not really immutable) but that subclasses can be modifiable. 3. Clarify some confusing, historical wording a