On Wed, 10 May 2023 23:07:01 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Just a trivial change for enforcing consistent NullPointerException behavior 
>> for the SecureRandom.nextBytes(byte[]) method.
>> 
>> Other similar methods such as Random.nextByte(byte[]) and its other 
>> subclasses all throw NPE for null byte[] argument. Most JDK default 
>> providers' SecureRandom impls also check and throw NPE. Thus, this should be 
>> moved up and enforced by the SecureRandom class to ensure consistency.
>> 
>> CSR has been filed.
>> 
>> Thanks,
>> Valerie
>
> Valerie Peng has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   updated reg test with review comments.

test/jdk/java/security/SecureRandom/NextBytesNull.java line 29:

> 27:  * @summary check NPE is thrown for various methods of SecureRandom class,
> 28:  *     e.g. SecureRandom(byte[]), nextBytes(byte[]), and setSeed(byte[]).
> 29:  * @run main/othervm NextBytesNull

Does this need to be run in othervm mode?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13788#discussion_r1191480288

Reply via email to