RFR JMC-6086: Unreleased stream when we reach end of decoding in StreamChunkIterator
Jayathirth D V
jayathirth.d.v at oracle.com
Sat Jul 21 09:34:52 UTC 2018
Hi Marcus,
Thanks for your inputs.
It's good to know that we have IO utility.
Please find updated webrev for review:
http://cr.openjdk.java.net/~jdv/6086/webrev.01/
Thanks,
Jay
-----Original Message-----
From: Marcus Hirt
Sent: Friday, July 20, 2018 4:58 PM
To: Jayathirth D V; jmc-dev at openjdk.java.net
Subject: Re: RFR JMC-6086: Unreleased stream when we reach end of decoding in StreamChunkIterator
Hi Jay,
May I suggest instead doing:
if (!hasNext) {
IOToolkit.closeSilently(inputStream);
}
/M
On 2018-07-20, 10:55, "jmc-dev on behalf of Jayathirth D V" <jmc-dev-bounces at openjdk.java.net on behalf of jayathirth.d.v at oracle.com> wrote:
Hello All,
Please review the following fix in JMC 7 :
Bug : https://bugs.openjdk.java.net/browse/JMC-6086
Webrev : http://cr.openjdk.java.net/~jdv/6086/webrev.00/
Issue: When we try to read compressed JFR file in ChunkReader, we use StreamChunkIterator and store the decoded stream. But when we reach end of stream we are not releasing the open stream.
Solution: Close the open stream when we reach end of file.
Ran unit tests and there are no failures. Also there are no problems with JDK 7/8/9/10/11 automated analysis results.
Thanks,
Jay
More information about the jmc-dev
mailing list