On Thu, 8 Jul 2021 03:28:10 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:
>
> donot wrap the exception from HprofReader
Looks good other than cleaning up the exception message.
test/lib/jdk/test/lib/hprof/parser/Reader.java line 178:
> 176: return r.printStackTraces();
> 177: } else {
> 178: throw new IOException("Unrecognized magic number
> of decompressed data: " + i);
"of decompressed data" just doesn't sound right. I'd suggest either removing
it, or maybe instead say "...found in decompressed data".
-------------
Changes requested by cjplummer (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4685