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 Coincidentally, I'm looking at modernizing some of the equals methods in java.base. src/java.base/share/classes/java/util/ResourceBundle.java line 743: > 741: return ((module != null) && > (module.equals(otherEntry.getModule())) && > 742: (caller != null) && > (caller.equals(otherEntry.getCallerModule()))); > 743: } catch (NullPointerException | ClassCastException e) { Are we sure that NPE can only be thrown when calling equals on `name` or `locale` and not, for example, from `getModule()` or `getCallerModule()`? ------------- PR Review: https://git.openjdk.org/jdk/pull/12328#pullrequestreview-1494905419 PR Review Comment: https://git.openjdk.org/jdk/pull/12328#discussion_r1239665426