4465490: Suspicious about double-check locking idiom being used in the code
authorsherman
Sun, 16 May 2010 21:22:07 -0700
changeset 5606 63aa4b61c0a8
parent 5605 bba86030a87b
child 5607 f01eda72e178
4465490: Suspicious about double-check locking idiom being used in the code Summary: to use volatile for the double-checked object Reviewed-by: weijun
jdk/src/share/classes/java/util/jar/JarVerifier.java
--- a/jdk/src/share/classes/java/util/jar/JarVerifier.java	Fri May 14 13:46:53 2010 -0700
+++ b/jdk/src/share/classes/java/util/jar/JarVerifier.java	Sun May 16 21:22:07 2010 -0700
@@ -76,7 +76,7 @@
     private ByteArrayOutputStream baos;
 
     /** The ManifestDigester object */
-    private ManifestDigester manDig;
+    private volatile ManifestDigester manDig;
 
     /** the bytes for the manDig object */
     byte manifestRawBytes[] = null;