diff --git a/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java b/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java index cd3c7562fc4..e1114054755 100644 --- a/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java +++ b/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java @@ -43,17 +43,17 @@ public class ReferenceQueue { */ public ReferenceQueue() { } - private static class Null extends ReferenceQueue { - boolean enqueue(Reference r) { + private static class Null extends ReferenceQueue { + boolean enqueue(Reference r) { return false; } } - static ReferenceQueue NULL = new Null<>(); - static ReferenceQueue ENQUEUED = new Null<>(); + static final ReferenceQueue NULL = new Null(); + static final ReferenceQueue ENQUEUED = new Null(); private static class Lock { }; - private Lock lock = new Lock(); + private final Lock lock = new Lock(); private volatile Reference head; private long queueLength = 0;