Re: [jdk17] RFR: JDK-8262841: Clarify the behavior of PhantomReference::refersTo

2021-06-30 Thread Roger Riggs
On Wed, 30 Jun 2021 16:49:44 GMT, Mandy Chung wrote: > `Reference::refersTo` behaves the same for soft, weak, and phantom references > whereas `PhantomReference::get` always returns `null` which is different than > soft and weak references. > > This patch clarifies the specification of

Re: [jdk17] RFR: JDK-8262841: Clarify the behavior of PhantomReference::refersTo

2021-06-30 Thread Kim Barrett
On Wed, 30 Jun 2021 16:49:44 GMT, Mandy Chung wrote: > `Reference::refersTo` behaves the same for soft, weak, and phantom references > whereas `PhantomReference::get` always returns `null` which is different than > soft and weak references. > > This patch clarifies the specification of

[jdk17] RFR: JDK-8262841: Clarify the behavior of PhantomReference::refersTo

2021-06-30 Thread Mandy Chung
`Reference::refersTo` behaves the same for soft, weak, and phantom references whereas `PhantomReference::get` always returns `null` which is different than soft and weak references. This patch clarifies the specification of `PhantomReference` to make it clear that `refersTo` can be used for