[9] RFR 8166253: (ch) FileLock object can get GC'd and result in unexpected release of file lock

Brian Burkhalter brian.burkhalter at oracle.com
Fri Feb 2 17:58:30 UTC 2018

On Feb 2, 2018, at 9:56 AM, Alan Bateman <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?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180202/e17f2997/attachment.html>

More information about the nio-dev mailing list