On Wed, 12 Jul 2023 16:46:08 GMT, Xue-Lei Andrew Fan <[email protected]> wrote:
>> This change refactors the RSAPadding class to return an output record
>> containing the status instead of relying on exception object to indicate a
>> failure.
>>
>> Thanks in advance for review~
>> Valerie
>
> src/java.base/share/classes/sun/security/rsa/RSAPadding.java line 372:
>
>> 370: return Output.FAIL;
>> 371: } else {
>> 372: return Output.pass(data);
>
> The Output.pass(byte[]) will create a new instance and thus make the behavior
> detectable. Maybe, the Output class is not necessary, 'null' value return
> could be used instead.
>
>
> - if (bp) {
> - return Output.FAIL;
> - } else {
> - return Output.pass(data);
> + return bp ? null : data;
Ok, I can change it back to byte[]
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14839#discussion_r1261602015