[9] RFR 8166253: (ch) FileLock object can get GC'd and result in unexpected release of file lock
Alan Bateman
Alan.Bateman at oracle.com
Fri Feb 2 18:03:34 UTC 2018
On 02/02/2018 17:58, Brian Burkhalter wrote:
>
> On Feb 2, 2018, at 9:56 AM, Alan Bateman <Alan.Bateman at oracle.com
> <mailto:Alan.Bateman at oracle.com>> wrote:
>
>>> I think the Set could probably be initialized at line 124 to a
>>> simple HashSet instead of a
>>> ConcurrentHashMap.KeySetView<FileLock,Boolean> but I wanted to
>>> solicit comments on that point.
>>>
>> Yes, it can be a HashSet. Also in the case of removeAll then you can
>> invoke locks.clear(). In the case of replace then I think it would be
>> more understandable if the remove+add are together.
>
> I was unsure about this latter. Otherwise does this look OK?
>
Yes, I think so. Also combined with the other patch will make it a lot
better.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180202/809ba2f9/attachment.html>
More information about the nio-dev
mailing list