RFR: 8269886: Inaccurate error message for compressed hprof test

Lin Zang lzang at openjdk.java.net
Tue Jul 6 06:32:12 UTC 2021


On Tue, 6 Jul 2021 03:14:15 GMT, David Holmes <dholmes at openjdk.org> 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.
>
> The existing message is a generic message covering the general operation of the whole try block. It seems far more appropriate than your new message, which only seems to apply to the final step. ???
> 
> David

Hi @dholmes-ora, 
     Thanks for your suggestion! I have update the PR which split the try block into two seperate ones to process different exceptions.

BRs,
Lin

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

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


More information about the serviceability-dev mailing list