On Fri, 4 Dec 2020 20:14:13 GMT, Peter Levart <plev...@openjdk.org> wrote:

>> Good point on checking k != null. A cleaner check:
>> 
>>         // then check for equality if the referent is not cleared
>>         Object k = e.get();
>>         return k != null || key.equals(k);
>
> You meant: `return k != null && key.equals(k);` right?

oops...yes.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1609

Reply via email to