[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: Mention provider when throwing NoSuchProviderException
From: |
Mark Wielaard |
Subject: |
[cp-patches] FYI: Mention provider when throwing NoSuchProviderException. |
Date: |
Mon, 10 Jan 2005 00:44:26 +0100 |
Hi,
Some of our java.security classes didn't mention which provider wasn't
found/installed when asked for a instance of an algorithm. This patch
fixes that:
2005-01-09 Mark Wielaard <address@hidden>
* java/security/AlgorithmParameterGenerator.java (getInstance):
Mention provider when throwing NoSuchProviderException.
* java/security/AlgorithmParameters.java (getInstance): Likewise.
* java/security/KeyFactory.java (getInstance): Likewise.
* java/security/KeyStore.java (getInstance): Likewise.
* java/security/SecureRandom.java (getInstance): Likewise.
* java/security/cert/CertificateFactory.java (getInstance): Likewise.
Useful when a program just refuses to run with as only indication
NoSuchProviderException.
Committed,
Mark
Index: java/security/AlgorithmParameterGenerator.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/security/AlgorithmParameterGenerator.java,v
retrieving revision 1.11
diff -u -r1.11 AlgorithmParameterGenerator.java
--- java/security/AlgorithmParameterGenerator.java 21 Oct 2004 20:22:12
-0000 1.11
+++ java/security/AlgorithmParameterGenerator.java 9 Jan 2005 23:37:23
-0000
@@ -174,7 +174,7 @@
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
Index: java/security/AlgorithmParameters.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/AlgorithmParameters.java,v
retrieving revision 1.11
diff -u -r1.11 AlgorithmParameters.java
--- java/security/AlgorithmParameters.java 21 Oct 2004 20:22:12 -0000
1.11
+++ java/security/AlgorithmParameters.java 9 Jan 2005 23:37:23 -0000
@@ -178,7 +178,7 @@
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
Index: java/security/KeyFactory.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/KeyFactory.java,v
retrieving revision 1.10
diff -u -r1.10 KeyFactory.java
--- java/security/KeyFactory.java 21 Oct 2004 20:22:12 -0000 1.10
+++ java/security/KeyFactory.java 9 Jan 2005 23:37:23 -0000
@@ -163,7 +163,7 @@
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
Index: java/security/KeyStore.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/KeyStore.java,v
retrieving revision 1.10
diff -u -r1.10 KeyStore.java
--- java/security/KeyStore.java 21 Oct 2004 20:22:12 -0000 1.10
+++ java/security/KeyStore.java 9 Jan 2005 23:37:23 -0000
@@ -164,7 +164,7 @@
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(type, p);
}
Index: java/security/SecureRandom.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/SecureRandom.java,v
retrieving revision 1.16
diff -u -r1.16 SecureRandom.java
--- java/security/SecureRandom.java 2 Dec 2004 13:17:21 -0000 1.16
+++ java/security/SecureRandom.java 9 Jan 2005 23:37:23 -0000
@@ -218,7 +218,7 @@
Provider p = Security.getProvider(provider);
if (p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(algorithm, p);
}
Index: java/security/cert/CertificateFactory.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/java/security/cert/CertificateFactory.java,v
retrieving revision 1.8
diff -u -r1.8 CertificateFactory.java
--- java/security/cert/CertificateFactory.java 21 Oct 2004 20:22:12 -0000
1.8
+++ java/security/cert/CertificateFactory.java 9 Jan 2005 23:37:23 -0000
@@ -138,7 +138,7 @@
{
Provider p = Security.getProvider(provider);
if( p == null)
- throw new NoSuchProviderException();
+ throw new NoSuchProviderException(provider);
return getInstance(type, p);
}
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: Mention provider when throwing NoSuchProviderException.,
Mark Wielaard <=