8324648: Avoid NoSuchMethodError when instantiating NativePRNG
Reviewed-by: shade, weijun, liach, valeriep
This commit is contained in:
parent
52d497619e
commit
69b2674c68
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, 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
|
||||
@ -203,11 +203,13 @@ public final class NativePRNG extends SecureRandomSpi {
|
||||
}
|
||||
|
||||
// constructor, called by the JCA framework
|
||||
public NativePRNG() {
|
||||
super();
|
||||
public NativePRNG(SecureRandomParameters params) {
|
||||
if (INSTANCE == null) {
|
||||
throw new AssertionError("NativePRNG not available");
|
||||
}
|
||||
if (params != null) {
|
||||
throw new IllegalArgumentException("Unsupported params: " + params.getClass());
|
||||
}
|
||||
}
|
||||
|
||||
// set the seed
|
||||
@ -251,11 +253,13 @@ public final class NativePRNG extends SecureRandomSpi {
|
||||
}
|
||||
|
||||
// constructor, called by the JCA framework
|
||||
public Blocking() {
|
||||
super();
|
||||
public Blocking(SecureRandomParameters params) {
|
||||
if (INSTANCE == null) {
|
||||
throw new AssertionError("NativePRNG$Blocking not available");
|
||||
}
|
||||
if (params != null) {
|
||||
throw new IllegalArgumentException("Unsupported params: " + params.getClass());
|
||||
}
|
||||
}
|
||||
|
||||
// set the seed
|
||||
@ -300,12 +304,14 @@ public final class NativePRNG extends SecureRandomSpi {
|
||||
}
|
||||
|
||||
// constructor, called by the JCA framework
|
||||
public NonBlocking() {
|
||||
super();
|
||||
public NonBlocking(SecureRandomParameters params) {
|
||||
if (INSTANCE == null) {
|
||||
throw new AssertionError(
|
||||
"NativePRNG$NonBlocking not available");
|
||||
}
|
||||
if (params != null) {
|
||||
throw new IllegalArgumentException("Unsupported params: " + params.getClass());
|
||||
}
|
||||
}
|
||||
|
||||
// set the seed
|
||||
|
Loading…
x
Reference in New Issue
Block a user