8025619: (fc) FileInputStream.getChannel on closed stream returns FileChannel that doesn't know that stream is closed

Alan Bateman Alan.Bateman at oracle.com
Wed Dec 10 08:18:11 UTC 2014


On 09/12/2014 20:11, Brian Burkhalter wrote:
>
> I was using the form suggested in this article
>
> http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html 
> <http://www.cs.umd.edu/%7Epugh/java/memoryModel/DoubleCheckedLocking.html>
>
> just before the references. Modified.
The problem with webrev.02 is that it didn't re-read this.channel and so 
no guarantee that it wouldn't create more than one FileChannel. I think 
you have it right now.


> :
>
> Here’s an updated patch:
>
> http://cr.openjdk.java.net/~bpb/8025619/webrev.03/ 
> <http://cr.openjdk.java.net/%7Ebpb/8025619/webrev.03/>
>
Looks good, and nice to have a 12 year old issue resolved.

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


More information about the nio-dev mailing list