RFR: 8232003: (fs) Files.write can leak file descriptor in the exception case
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 9 09:27:04 UTC 2019
On 09/10/2019 08:20, Langer, Christoph wrote:
> Hi,
>
> the patch looks good to me, too.
>
> I'm wondering, though, whether StreamEncoder::implClose shouldn't be made more resilient?
>
> E.g. when writeBytes() fails at [0], shouldn't still a close on ch or out be attempted? Maybe under a separate bug?
>
Yes, there are several long standing issues here. Brian fixed some of
the issues with JDK-8220477 but there are other wises when close fails
that needs attention. My guess is that Severin is looking to backport
the change for JDK-8232003 so the risk there is low. Changes to
StreamEncoder will need a lot more bake time.
-Alan.
More information about the nio-dev
mailing list