github - eliminated warning happening with Java 12.
{"org.conscrypt.OpenSSLProvider", "org.conscrypt.OpenSSLRandom"},
};
- private static final Object[] initialEntropySourceAndSpi = findSource();
-
// Cascade through providers looking for match.
private final static Object[] findSource()
{
private static class CoreSecureRandom
extends SecureRandom
{
- CoreSecureRandom()
+ CoreSecureRandom(Object[] initialEntropySourceAndSpi)
{
super((SecureRandomSpi)initialEntropySourceAndSpi[1], (Provider)initialEntropySourceAndSpi[0]);
}
@@ -120,9 +118,9 @@ public SecureRandom run()
private static SecureRandom createCoreSecureRandom()
{
- if (initialEntropySourceAndSpi != null)
+ if (Security.getProperty("securerandom.source") == null)
{
- return new CoreSecureRandom();
+ return new CoreSecureRandom(findSource());
}
else
{
