<i18n dev> RFR: 8301492: Modernize equals() method of ResourceBundle.CacheKey and Bundles.CacheKey
Mandy Chung
mchung at openjdk.org
Tue Jan 31 17:35:22 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.
return moduleRef.refersTo(otherEntry.getModule()) &&
callerRef.refersTo(otherEntry.getCallerModule());
You need to check if module and caller module are non-null.
`equals` returns true only if the module and callerModule of this `CacheKey` and other `CacheKey` are the same and non-null.
-------------
PR: https://git.openjdk.org/jdk/pull/12328
More information about the i18n-dev
mailing list