< prev index next >
src/java.base/share/classes/java/lang/ref/Reference.java
Print this page
@@ -139,18 +139,10 @@
}
}
}
/*
- * system property to disable clearing before enqueuing.
- */
- 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.
*/
private static native Reference<Object> getAndClearReferencePendingList();
/*
@@ -297,11 +289,10 @@
* @return <code>true</code> if this reference object was successfully
* enqueued; <code>false</code> if it was already enqueued or if
* it was not registered with a queue when it was created
*/
public boolean enqueue() {
- if (!ClearBeforeEnqueue.DISABLE)
this.referent = null;
return this.queue.enqueue(this);
}
/* -- Constructors -- */
< prev index next >