On Tue, 6 Jul 2021 06:32:12 GMT, Lin Zang <[email protected]> wrote:

>> The current implementation of hprof Reader for testing always prompts "Can 
>> not decompress the compressed hprof file" when there is error for testing 
>> gzipped heap dump. This is inaccurate if the gzipped file was decompressed 
>> successfully but the hprof file format is incorrect. So the inaccurate error 
>> message could be misleading for issue analysis.
>> 
>> This trivial PR refine the error message by simply print "Can not get stack 
>> trace from the compressed hprof file", the underlying exception from 
>> GZIPInputStream() or HprofReader() would give accurate error info.
>
> Lin Zang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   divid the try block

Hi David,
Thanks for reviewing!
 
> This code is not very well written though - the file streams do not get 
> closed and the decompressed output file doesn't seem to get deleted when I 
> would expect.

Agree. I will create a seperate issue to fix it.

BRs,
Lin

-------------

PR: https://git.openjdk.java.net/jdk/pull/4685

Reply via email to