diff options
Diffstat (limited to 'luni/src/main/java/java/security/SecureRandom.java')
-rw-r--r-- | luni/src/main/java/java/security/SecureRandom.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/luni/src/main/java/java/security/SecureRandom.java b/luni/src/main/java/java/security/SecureRandom.java index 68a2917..6ed631c 100644 --- a/luni/src/main/java/java/security/SecureRandom.java +++ b/luni/src/main/java/java/security/SecureRandom.java @@ -88,7 +88,6 @@ public class SecureRandom extends Random { */ public SecureRandom() { super(0); - Services.refresh(); Provider.Service service = Services.getSecureRandomService(); if (service == null) { this.provider = null; @@ -154,7 +153,7 @@ public class SecureRandom extends Random { */ public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { - throw new NullPointerException(); + throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new SecureRandom((SecureRandomSpi) sap.spi, sap.provider, @@ -213,7 +212,7 @@ public class SecureRandom extends Random { throw new IllegalArgumentException(); } if (algorithm == null) { - throw new NullPointerException(); + throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new SecureRandom((SecureRandomSpi) spi, provider, algorithm); |