Proposal: Improve java.lang.ref processing in Java SE 8 and JDK 8

Kim Barrett kim.barrett at oracle.com
Mon Apr 18 07:00:48 UTC 2022


> On Apr 13, 2022, at 12:55 PM, Volker Simonis <volker.simonis at gmail.com> wrote:
> 
> Hi Iris,
> 
> Thanks for the heads-up. Is there any evidence where this has caused
> compatibility issues?

So far as I can tell, Oracle hasn't received any compatibility complaints
regarding any of these changes.

During the development of CCC-8175797 (enqueue first clears the reference) a
search of other projects was conducted and found that Reference.enqueue was
rarely used, and often in conjunction with clearing the reference too. The
property to revert to the older behavior was not publicly documented at the
time the change was made (the compatibility review process was non-public at
that time).

> Also, I see that JDK-8175797 [1] (which is the implementation
> CCC-8175797) introduced the property
> `jdk.lang.ref.disableClearBeforeEnqueue` which can be used to maintain
> backward compatibility with the old behavior. However, this property
> wasn't really functional until it was fixed by JDK-8178832. Do you
> plan to downport JDK-8178832 as well?

For JDK-8175797 our current plan is to backport all 3 of JDK-8175797,
JDK-8178832, and JDK-8193780 as a single commit. That is, the Reference
Implementation won't support reverting to the old behavior via setting a
property. I think such a backward compatibility mechanism doesn't belong in
the Reference Implementation, and just adds clutter to the specification
change being proposed for the MR. Maintainers of a production JDK could add
such a mechanism if necessary to meet the needs of their user community.




More information about the jdk8u-dev mailing list