On Wed, 1 Feb 2023 10:36:12 GMT, Sergey Tsypanov <stsypa...@openjdk.org> wrote:

>> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire 
>> outdated. This simple clean-up modernizes them.
>
> Sergey Tsypanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Restore logic

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.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/12328#discussion_r1240442051

Reply via email to