Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-16 Thread Naoto Sato
I created a JIRA issue for this: https://bugs.openjdk.java.net/browse/JDK-8253240 Naoto On 9/16/20 2:11 AM, Pavel Rappo wrote: On 15 Sep 2020, at 21:50, Rob Spoor wrote: On 15/09/2020 22:02, Pavel Rappo wrote: On 15 Sep 2020, at 20:50, Brian Burkhalter wrote: On Sep 15, 2020, at 12:38

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-16 Thread Pavel Rappo
> On 15 Sep 2020, at 21:50, Rob Spoor wrote: > > On 15/09/2020 22:02, Pavel Rappo wrote: >>> On 15 Sep 2020, at 20:50, Brian Burkhalter >>> wrote: >>> On Sep 15, 2020, at 12:38 PM, Kevin Rushforth wrote: I see this in DecimalFormatSymbols: /** >>>

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Joe Darcy
Note that we've had the javac warning about equals and hashCode overriding as a fatal build condition since at least JDK 9. -Joe On 9/15/2020 12:36 PM, Brian Burkhalter wrote: Hello, The override of hashCode() looks like it is still there in JDK 15 [1]. I don’t know however why it does not a

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Rob Spoor
On 15/09/2020 22:02, Pavel Rappo wrote: On 15 Sep 2020, at 20:50, Brian Burkhalter wrote: On Sep 15, 2020, at 12:38 PM, Kevin Rushforth wrote: I see this in DecimalFormatSymbols: /** * Override hashCode. */ private volatile int hashCode; @Override public in

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Pavel Rappo
> On 15 Sep 2020, at 20:50, Brian Burkhalter > wrote: > >> On Sep 15, 2020, at 12:38 PM, Kevin Rushforth >> wrote: >> >> I see this in DecimalFormatSymbols: >> >> >> /** >> * Override hashCode. >> */ > private volatile int hashCode; >> @Override >> public int has

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Brian Burkhalter
> On Sep 15, 2020, at 12:38 PM, Kevin Rushforth > wrote: > > I see this in DecimalFormatSymbols: > > > /** > * Override hashCode. > */ > >>>private volatile int hashCode; > @Override > public int hashCode() { > > Although, I'm not sure why the intervening privat

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Rob Spoor
Hmm, I could have sworn I checked https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/text/DecimalFormatSymbols.java and didn't find it... I guess it's a false positive then. On 15/09/2020 21:36, Brian Burkhalter wrote: Hello, The override of hashCode() looks like it

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Kevin Rushforth
I see this in DecimalFormatSymbols: /**   * Override hashCode.   */ >>>    private volatile int hashCode; @Override public int hashCode() { Although, I'm not sure why the intervening private field would prevent javadoc from generating at least a method with an empty doc.

Re: [BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Brian Burkhalter
Hello, The override of hashCode() looks like it is still there in JDK 15 [1]. I don’t know however why it does not appear as such in the javadoc [2]. Brian [1] http://hg.openjdk.java.net/jdk/jdk15/file/fb7064dc63f9/src/java.base/share/classes/java/text/DecimalFormatSymbols.java#l760 [2] https

[BUG] Java 15: DecimalFormatSymbols overrides equals but not hashCode

2020-09-15 Thread Rob Spoor
In Java 14 and before, DecimalFormatSymbols had overrides for both equals and hashCode. In Java 15, the override for hashCode has disappeared, and it now inherits hashCode from java.lang.Object. That means it now violates the contract for equals + hashCode: two equal DecimalFormatSymbols instan