6819110: Lazily load Sun digest provider for jar verification

Lazily call Providers.getSunProvider() instead of at static initializer

Reviewed-by: mullan
This commit is contained in:
Mandy Chung 2009-03-31 23:52:04 -07:00
parent 445c56f3ea
commit 1870624c08

View File

@ -44,8 +44,6 @@ public class ManifestEntryVerifier {
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 @@ public class ManifestEntryVerifier {
try {
digest = MessageDigest.getInstance
(algorithm, digestProvider);
(algorithm, Providers.getSunProvider());
createdDigests.put(algorithm, digest);
} catch (NoSuchAlgorithmException nsae) {
// ignore