mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8256167: Convert JDK use of Reference::get
to Reference::refersTo
Reviewed-by: sspitsyn, shade, dfuchs, alanb, kbarrett
This commit is contained in:
parent
78be334c38
commit
972bc3b408
12 changed files with 49 additions and 53 deletions
|
@ -777,7 +777,7 @@ public class LogManager {
|
|||
}
|
||||
LoggerWeakRef ref = namedLoggers.get(name);
|
||||
if (ref != null) {
|
||||
if (ref.get() == null) {
|
||||
if (ref.refersTo(null)) {
|
||||
// It's possible that the Logger was GC'ed after a
|
||||
// drainLoggerRefQueueBounded() call above so allow
|
||||
// a new one to be registered.
|
||||
|
|
|
@ -2404,8 +2404,7 @@ public class Logger {
|
|||
// assert parent.kids != null;
|
||||
for (Iterator<LogManager.LoggerWeakRef> iter = parent.kids.iterator(); iter.hasNext(); ) {
|
||||
ref = iter.next();
|
||||
Logger kid = ref.get();
|
||||
if (kid == this) {
|
||||
if (ref.refersTo(this)) {
|
||||
// ref is used down below to complete the reparenting
|
||||
iter.remove();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue