RFR: 8188055: (ref) Add Reference::refersTo predicate [v5]
Kim Barrett
kbarrett at openjdk.java.net
Tue Oct 20 05:26:18 UTC 2020
On Tue, 20 Oct 2020 03:25:45 GMT, Mandy Chung <mchung at openjdk.org> wrote:
> @kimbarrett your reworded text is okay. I think "if it initially had some other referent value" can be dropped.
>
> For a `Reference` constructed with a `null` referent, we can clarify in the spec that such reference object will never
> get cleared and enqueued. I suggest to file a separate issue to follow up.
I don't think that clause can be dropped, because of explicit clearing (by clear() or enqueue()) rather than by the
GC. If the reference was constructed with a null referent, ref.refersTo(null) cannot tell whether ref.clear() has been
called.
-------------
PR: https://git.openjdk.java.net/jdk/pull/498
More information about the core-libs-dev
mailing list