changeset 50311:fe42de5250f3

8203327: Small cleanups in java.lang.ref Reviewed-by: mr
author martin
date Tue, 29 May 2018 19:15:49 -0700
parents d11e87c8cd44
children fd2fccf3b079
files src/java.base/share/classes/java/lang/ref/ReferenceQueue.java
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Tue May 29 18:10:09 2018 -0400
+++ b/src/java.base/share/classes/java/lang/ref/ReferenceQueue.java	Tue May 29 19:15:49 2018 -0700
@@ -43,17 +43,17 @@
      */
     public ReferenceQueue() { }
 
-    private static class Null<S> extends ReferenceQueue<S> {
-        boolean enqueue(Reference<? extends S> r) {
+    private static class Null extends ReferenceQueue<Object> {
+        boolean enqueue(Reference<?> r) {
             return false;
         }
     }
 
-    static ReferenceQueue<Object> NULL = new Null<>();
-    static ReferenceQueue<Object> ENQUEUED = new Null<>();
+    static final ReferenceQueue<Object> NULL = new Null();
+    static final ReferenceQueue<Object> ENQUEUED = new Null();
 
     private static class Lock { };
-    private Lock lock = new Lock();
+    private final Lock lock = new Lock();
     private volatile Reference<? extends T> head;
     private long queueLength = 0;