summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/javax/crypto/KeyAgreement.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/javax/crypto/KeyAgreement.java')
-rw-r--r--luni/src/main/java/javax/crypto/KeyAgreement.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/luni/src/main/java/javax/crypto/KeyAgreement.java b/luni/src/main/java/javax/crypto/KeyAgreement.java
index 9c5d86c..51b4cd1 100644
--- a/luni/src/main/java/javax/crypto/KeyAgreement.java
+++ b/luni/src/main/java/javax/crypto/KeyAgreement.java
@@ -99,7 +99,7 @@ public class KeyAgreement {
public static final KeyAgreement 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 KeyAgreement((KeyAgreementSpi) sap.spi, sap.provider, algorithm);
@@ -161,7 +161,7 @@ public class KeyAgreement {
throw new IllegalArgumentException("provider == null");
}
if (algorithm == null) {
- throw new NullPointerException();
+ throw new NullPointerException("algorithm == null");
}
Object spi = ENGINE.getInstance(algorithm, provider, null);
return new KeyAgreement((KeyAgreementSpi) spi, provider, algorithm);