6819110: Lazily load Sun digest provider for jar verification
authormchung
Tue, 31 Mar 2009 23:52:04 -0700
changeset 2436 ae4667371301
parent 2435 5c063c7a9f51
child 2437 098db6faaf66
child 2438 21c111b51aa8
child 2441 228c040622a2
6819110: Lazily load Sun digest provider for jar verification Summary: Lazily call Providers.getSunProvider() instead of at static initializer Reviewed-by: mullan
jdk/src/share/classes/sun/security/util/ManifestEntryVerifier.java
--- a/jdk/src/share/classes/sun/security/util/ManifestEntryVerifier.java	Mon Mar 30 19:22:27 2009 +0100
+++ b/jdk/src/share/classes/sun/security/util/ManifestEntryVerifier.java	Tue Mar 31 23:52:04 2009 -0700
@@ -44,8 +44,6 @@
 
     private static final Debug debug = Debug.getInstance("jar");
 
-    private static final Provider digestProvider = Providers.getSunProvider();
-
     /** the created digest objects */
     HashMap<String, MessageDigest> createdDigests;
 
@@ -127,7 +125,7 @@
                     try {
 
                         digest = MessageDigest.getInstance
-                                        (algorithm, digestProvider);
+                                        (algorithm, Providers.getSunProvider());
                         createdDigests.put(algorithm, digest);
                     } catch (NoSuchAlgorithmException nsae) {
                         // ignore