jdk/src/java.base/share/classes/java/lang/ref/Reference.java
changeset 44748 e7d6b4646d04
parent 44119 e813e246ef17
--- a/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Tue Apr 18 11:35:29 2017 -0700
+++ b/jdk/src/java.base/share/classes/java/lang/ref/Reference.java	Wed Apr 19 00:29:26 2017 -0400
@@ -143,8 +143,10 @@
     /*
      * system property to disable clearing before enqueuing.
      */
-    private static final boolean disableClearBeforeEnqueue
-        = Boolean.getBoolean("jdk.lang.ref.disableClearBeforeEnqueue");
+    private static final class ClearBeforeEnqueue {
+        static final boolean DISABLE =
+            Boolean.getBoolean("jdk.lang.ref.disableClearBeforeEnqueue");
+    }
 
     /*
      * Atomically get and clear (set to null) the VM's pending list.
@@ -297,7 +299,7 @@
      *           it was not registered with a queue when it was created
      */
     public boolean enqueue() {
-        if (!disableClearBeforeEnqueue)
+        if (!ClearBeforeEnqueue.DISABLE)
             this.referent = null;
         return this.queue.enqueue(this);
     }