jdk/src/share/classes/com/sun/crypto/provider/CipherCore.java
changeset 16909 78a1749a43e2
parent 15010 ec6b49ce42b1
child 20752 f0f0acea9113
--- 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");