JDK-8193781 : (ref) Remove the undocumented "jdk.lang.ref.disableClearBeforeEnqueue" system property
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 11
  • Submitted: 2017-12-18
  • Updated: 2022-03-30
  • Resolved: 2017-12-21
Related Reports
CSR :  
Relates :  
Description
Summary
-------

Remove the system property `jdk.lang.ref.disableClearBeforeEnqueue` that was added
to restore the `Reference::enqueue` to JDK 8 behavior, i.e. not to clear the reference object.

Problem
-------

The behavior of the `Reference::enqueue` method was changed in JDK 9 to 
clear the reference object before enqueuing.  A system property `jdk.lang.ref.disableClearBeforeEnqueue` 
was added to allow existing code to revert to JDK 8 behavior as an interim solution
and give time to migrate to JDK 9 new behavior.

Solution
--------

Remove `jdk.lang.ref.disableClearBeforeEnqueue` system property support.

Specification
-------------

Setting -Djdk.lang.ref.disableClearBeforeEnqueue=true will have no effect
to `Reference::enqueue` method.

No spec change since `jdk.lang.ref.disableClearBeforeEnqueue` system property
is undocumented.
Comments
Moving to approved.
21-12-2017