8155191: Specify that SecureRandom.nextBytes(byte[]) throws NullPointerException when byte array is null

Reviewed-by: mullan
This commit is contained in:
Valerie Peng 2023-05-12 23:00:00 +00:00
parent 3bf3876185
commit 46e3d24a6f
4 changed files with 97 additions and 14 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -338,8 +338,6 @@ public abstract class AbstractDrbg {
protected final void engineNextBytes(
byte[] result, SecureRandomParameters params) {
Objects.requireNonNull(result);
if (debug != null) {
debug.println(this, "nextBytes");
}