mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8324648: Avoid NoSuchMethodError when instantiating NativePRNG
Reviewed-by: shade, weijun, liach, valeriep
This commit is contained in:
parent
52d497619e
commit
69b2674c68
1 changed files with 13 additions and 7 deletions
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* 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
|
// constructor, called by the JCA framework
|
||||||
public NativePRNG() {
|
public NativePRNG(SecureRandomParameters params) {
|
||||||
super();
|
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
throw new AssertionError("NativePRNG not available");
|
throw new AssertionError("NativePRNG not available");
|
||||||
}
|
}
|
||||||
|
if (params != null) {
|
||||||
|
throw new IllegalArgumentException("Unsupported params: " + params.getClass());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the seed
|
// set the seed
|
||||||
|
@ -251,11 +253,13 @@ public final class NativePRNG extends SecureRandomSpi {
|
||||||
}
|
}
|
||||||
|
|
||||||
// constructor, called by the JCA framework
|
// constructor, called by the JCA framework
|
||||||
public Blocking() {
|
public Blocking(SecureRandomParameters params) {
|
||||||
super();
|
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
throw new AssertionError("NativePRNG$Blocking not available");
|
throw new AssertionError("NativePRNG$Blocking not available");
|
||||||
}
|
}
|
||||||
|
if (params != null) {
|
||||||
|
throw new IllegalArgumentException("Unsupported params: " + params.getClass());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the seed
|
// set the seed
|
||||||
|
@ -300,12 +304,14 @@ public final class NativePRNG extends SecureRandomSpi {
|
||||||
}
|
}
|
||||||
|
|
||||||
// constructor, called by the JCA framework
|
// constructor, called by the JCA framework
|
||||||
public NonBlocking() {
|
public NonBlocking(SecureRandomParameters params) {
|
||||||
super();
|
|
||||||
if (INSTANCE == null) {
|
if (INSTANCE == null) {
|
||||||
throw new AssertionError(
|
throw new AssertionError(
|
||||||
"NativePRNG$NonBlocking not available");
|
"NativePRNG$NonBlocking not available");
|
||||||
}
|
}
|
||||||
|
if (params != null) {
|
||||||
|
throw new IllegalArgumentException("Unsupported params: " + params.getClass());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the seed
|
// set the seed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue