[jdk17u-dev] RFR: 8302017: Allocate BadPaddingException only if it will be thrown
Brian Stafford
bstafford at openjdk.org
Tue Oct 10 21:25:01 UTC 2023
On Tue, 10 Oct 2023 02:36:21 GMT, Saint Wesonga <duke at openjdk.org> wrote:
> Backport [334b977259930368160db705c1f2feda0b0e8707](https://github.com/openjdk/jdk17u-dev/commit/300ed9156581adb09e8258bc2da21f3bff4ecbde) from https://github.com/openjdk/jdk21u/pull/79
>
> Passes tier1 tests - tested on Linux x64.
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....
-------------
PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1864#discussion_r1353437627
More information about the jdk-updates-dev
mailing list