8256167: Convert JDK use of Reference::get to Reference::refersTo

Reviewed-by: sspitsyn, shade, dfuchs, alanb, kbarrett
This commit is contained in:
Mandy Chung 2020-12-06 00:08:22 +00:00
parent 78be334c38
commit 972bc3b408
12 changed files with 49 additions and 53 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1755,7 +1755,7 @@ public abstract class ResourceBundle {
// Otherwise, remove the cached one since we can't keep
// the same bundles having different parents.
BundleReference bundleRef = cacheList.get(cacheKey);
if (bundleRef != null && bundleRef.get() == bundle) {
if (bundleRef != null && bundleRef.refersTo(bundle)) {
cacheList.remove(cacheKey, bundleRef);
}
}