[jdk17u-dev] RFR: 8302017: Allocate BadPaddingException only if it will be thrown [v3]

Brian Stafford bstafford at openjdk.org
Fri Oct 27 22:48:03 UTC 2023


On Tue, 10 Oct 2023 21:20:29 GMT, Brian Stafford <bstafford at openjdk.org> wrote:

>> Saint Wesonga has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix copyright year
>
> src/java.base/share/classes/sun/security/rsa/RSAPadding.java line 252:
> 
>> 250:         switch (type) {
>> 251:         case PAD_NONE:
>> 252:             // assert len == paddedSize and data.length - ofs > len?
> 
> I think this assert is only relevant on tip, where the output of this function is passed to Output.pass(). However, it's in the jdk21u backport, so I guess we should leave it in for consistency....

I can't seem to find the Output.pass() reference I was looking at previously. I would leave this comment in for consistency with the tip and 21u PRs.

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

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1864#discussion_r1375010731


More information about the jdk-updates-dev mailing list