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

Rob Spoor openjdk at icemanx.nl
Tue Sep 15 20:50:55 UTC 2020


On 15/09/2020 22:02, Pavel Rappo wrote:
>> On 15 Sep 2020, at 20:50, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>>
>>> On Sep 15, 2020, at 12:38 PM, Kevin Rushforth <kevin.rushforth at oracle.com> wrote:
>>>
>>> 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
> 
> https://bugs.openjdk.java.net/browse/JDK-8187386
> 

So in this case, the solution would be to remove the superfluous 
"Override equals." comment from the equals method, right?



More information about the core-libs-dev mailing list