--- a/jdk/src/share/classes/com/sun/crypto/provider/CipherCore.java Thu Apr 11 12:22:23 2013 +0900
+++ b/jdk/src/share/classes/com/sun/crypto/provider/CipherCore.java Thu Apr 11 17:57:08 2013 +0100
@@ -426,17 +426,13 @@
}
}
try {
- params = AlgorithmParameters.getInstance(algName, "SunJCE");
+ params = AlgorithmParameters.getInstance(algName,
+ SunJCE.getInstance());
+ params.init(spec);
} catch (NoSuchAlgorithmException nsae) {
// should never happen
throw new RuntimeException("Cannot find " + algName +
" AlgorithmParameters implementation in SunJCE provider");
- } catch (NoSuchProviderException nspe) {
- // should never happen
- throw new RuntimeException("Cannot find SunJCE provider");
- }
- try {
- params.init(spec);
} catch (InvalidParameterSpecException ipse) {
// should never happen
throw new RuntimeException(spec.getClass() + " not supported");