RFR: 8232003: (fs) Files.write can leak file descriptor in the exception case

Severin Gehwolf sgehwolf at redhat.com
Tue Oct 8 17:55:19 UTC 2019


On Tue, 2019-10-08 at 18:42 +0100, Alan Bateman wrote:
> 
> On 08/10/2019 18:02, Severin Gehwolf wrote:
> > Hi,
> > 
> > Could I please get a review of this fix for a resource leak on the
> > exception path in Files.write? The resource leak can surface, for
> > example, when the underlying filesystem runs out of disk space, but
> > some user code catches IOException and continues to try to write to
> > some path on the full disk. The bug has some details.
> NFS is the other scenario where close fails as the buffered bytes cannot 
> be flushed to the server. The patch looks good.

Thanks for the review, Alan!

Cheers,
Severin



More information about the nio-dev mailing list