<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 9/8/14 12:59 PM, Staffan Larsen
wrote:<br>
</div>
<blockquote
cite="mid:BF54441F-3A4C-441A-95A0-FB7342CD8221@oracle.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<br>
<div>
<div>On 8 sep 2014, at 21:26, <a moz-do-not-send="true"
href="mailto:serguei.spitsyn@oracle.com">serguei.spitsyn@oracle.com</a>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">This looks good to me.<br>
</div>
</div>
</blockquote>
<div><br>
</div>
Thanks.</div>
<div><br>
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix"> <br>
A minor question:<br>
<br>
src/jdk.attach/windows/classes/sun/tools/attach/VirtualMachineImpl.java<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre><span class="new"> 110 is.close();
An IOException can be thrown in the readErrorMessage().
Would it make sense to use a finally statement </span><span class="new"><span class="new">to close the stream</span>?
</span></pre>
</div>
</div>
</blockquote>
<div>In most cases the stream is returned from the method so we
can’t always close it.</div>
</div>
</blockquote>
<br>
In this particular case the stream is not returned from the method
call:<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre> 103 PipedInputStream is = new PipedInputStream(hPipe);</pre>
<br>
Thanks,<br>
Serguei<br>
<br>
<blockquote
cite="mid:BF54441F-3A4C-441A-95A0-FB7342CD8221@oracle.com"
type="cite">
<div>
<div><br>
</div>
<div>/Staffan</div>
<div><br>
</div>
<br>
<blockquote type="cite">
<div text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">
<pre><span class="new">
Thanks,
Serguei
</span></pre>
<br>
On 9/8/14 5:25 AM, Staffan Larsen wrote:<br>
</div>
<blockquote
cite="mid:AC533746-8B62-40FC-BE59-3C568A32CB4B@oracle.com"
type="cite">
<pre wrap="">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: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://cr.openjdk.java.net/%7Esla/8057558/webrev.00/">http://cr.openjdk.java.net/~sla/8057558/webrev.00/</a>
bug: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://bugs.openjdk.java.net/browse/JDK-8057558">https://bugs.openjdk.java.net/browse/JDK-8057558</a>
Thanks,
/Staffan</pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
</body>
</html>