RFR: 8057558 VirtualMachineImpl.execute on windows should close PipedInputStream before throwing exceptions

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Mon Sep 8 19:26:40 UTC 2014


This looks good to me.

A minor question:

src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java

  110                 is.close();

An IOException can be thrown in the readErrorMessage().
Would it make sense to use a finally statementto close the stream?

Thanks,
Serguei


On 9/8/14 5:25 AM, Staffan Larsen wrote:
> Two fixes:
> - The PipedInputStream used by the attach code on windows is not closed in case of errors
> - The InputStreams returned by VirtualMachine.execute are not closed by all callers
>
> webrev: http://cr.openjdk.java.net/~sla/8057558/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-8057558
>
> Thanks,
> /Staffan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20140908/3fdba089/attachment.html>


More information about the serviceability-dev mailing list