RFR: 8155191: Specify that SecureRandom.nextBytes(byte[]) throws NullPointerException when byte array is null [v3]
Valerie Peng
valeriep at openjdk.org
Wed May 10 23:07:01 UTC 2023
> 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.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13788/files
- new: https://git.openjdk.org/jdk/pull/13788/files/34ebdfa7..3ee76896
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13788&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13788&range=01-02
Stats: 163 lines in 2 files changed: 83 ins; 80 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/13788.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13788/head:pull/13788
PR: https://git.openjdk.org/jdk/pull/13788
More information about the security-dev
mailing list