jdk/src/share/classes/com/sun/crypto/provider/PBES1Core.java
changeset 16909 78a1749a43e2
parent 15010 ec6b49ce42b1
child 21278 ef8a3a2a72f2
--- a/jdk/src/share/classes/com/sun/crypto/provider/PBES1Core.java	Thu Apr 11 12:22:23 2013 +0900
+++ b/jdk/src/share/classes/com/sun/crypto/provider/PBES1Core.java	Thu Apr 11 17:57:08 2013 +0100
@@ -169,16 +169,12 @@
         PBEParameterSpec pbeSpec = new PBEParameterSpec(salt, iCount);
         try {
             params = AlgorithmParameters.getInstance("PBEWithMD5And" +
-                (algo.equalsIgnoreCase("DES")? "DES":"TripleDES"), "SunJCE");
+                (algo.equalsIgnoreCase("DES")? "DES":"TripleDES"),
+                SunJCE.getInstance());
+            params.init(pbeSpec);
         } catch (NoSuchAlgorithmException nsae) {
             // should never happen
             throw new RuntimeException("SunJCE called, but not configured");
-        } catch (NoSuchProviderException nspe) {
-            // should never happen
-            throw new RuntimeException("SunJCE called, but not configured");
-        }
-        try {
-            params.init(pbeSpec);
         } catch (InvalidParameterSpecException ipse) {
             // should never happen
             throw new RuntimeException("PBEParameterSpec not supported");