[jdk8u-dev] RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v2]

Martin Balao mbalao at openjdk.org
Fri Dec 15 05:38:47 UTC 2023


On Thu, 14 Dec 2023 14:34:22 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

>> Almost clean backport from [JDK11 PR](https://github.com/openjdk/jdk11u-dev/pull/2383)
>> The only changes in the RSASignature::engineVerify() method: getDigestValue() is called outside of try/catch block
>
> Alexey Bakhtin has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fixed copyright date and engineVerify formating

Thanks for proposing this backport.

I meant adding the "// https://www.rfc..." comment only to the try block, not the previous "if". In 8u we don't have 8149802 that adds a try-finally block to call resetDigest, so there isn't a reason for it. Should cause no harm, but I'd keep it as in your 1st proposal. Sorry for the confusion. Anyways, this is a minor detail, looks good to me.

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

Marked as reviewed by mbalao (Reviewer).

PR Review: https://git.openjdk.org/jdk8u-dev/pull/403#pullrequestreview-1783150583


More information about the jdk8u-dev mailing list