RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey [v3]
Sergey Tsypanov
stsypanov at openjdk.org
Sun Jun 25 18:17:31 UTC 2023
On Fri, 23 Jun 2023 22:02:22 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/java.base/share/classes/sun/util/resources/Bundles.java line 510:
>>
>>> 508: return false;
>>> 509: }
>>> 510: return Objects.equals(locale, otherEntry.locale)
>>
>> While the proposal is not wrong, you might want to consider reverting the change to those two lines: 511 and 512. The reason being is that neither `locale` nor `name` can be null, if I understand this class correctly.
>>
>> NPE was seemingly caught to cover for `other` being null.
>
>> NPE was seemingly caught to cover for other being null.
>
> Unlike that of other file in this PR.
Done
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12328#discussion_r1241256825
More information about the core-libs-dev
mailing list