RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey
Sergey Tsypanov
stsypanov at openjdk.org
Tue Jan 31 11:54:49 UTC 2023
On Tue, 31 Jan 2023 11:40:43 GMT, Sergey Tsypanov <stsypanov at openjdk.org> wrote:
> `ResourceBundle.CacheKey.equals()` and `Bundles.CacheKey.equals()` are quire outdated. This simple clean-up modernizes them.
Btw, in `ResourceBundle.CacheKey.equals()` can we replace
Module module = getModule();
Module caller = getCallerModule();
return Objects.equals(module, otherEntry.getModule()) &&
Objects.equals(caller, otherEntry.getCallerModule());
with
return moduleRef.refersTo(otherEntry.getModule()) &&
callerRef.refersTo(otherEntry.getCallerModule());
?
-------------
PR: https://git.openjdk.org/jdk/pull/12328
More information about the core-libs-dev
mailing list