[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
Tue Jan 30 16:24:06 UTC 2018
On Jan 30, 2018, at 12:58 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> The proposed fix is:
>>
>> http://cr.openjdk.java.net/~bpb/8166253/webrev.03/<http://cr.openjdk.java.net/%7Ebpb/8166253/webrev.03/>
>>
> I think it would be simpler if FileChannel maintained a set of the valid locks obtained via the channel, the the unlock can remove the lock from the set.
This is already simpler by about 50% than the version I proposed before but I’ll investigate your suggestion.
> While in the area then I think we can drop SimpleFileLockTable - that was for 1.4/1.5 era compatibility (enabled via the sun.nio.ch.disableSystemWideOverlappingFileLockCheck system property) and I can't imagine anything dependent on this broken behavior in 2018.
Yes I saw that. I can include its removal in an update.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20180130/5ddc6ee0/attachment.html>
More information about the nio-dev
mailing list