incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1455847 - /sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
Date Wed, 13 Mar 2013 09:30:46 GMT
Author: bdelacretaz
Date: Wed Mar 13 09:30:45 2013
New Revision: 1455847

URL: http://svn.apache.org/r1455847
Log:
SLING-2785 - add missing volatile, thanks to Lukas Eder for this contribution!

Modified:
    sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java

Modified: sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java?rev=1455847&r1=1455846&r2=1455847&view=diff
==============================================================================
--- sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
(original)
+++ sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceMetadata.java
Wed Mar 13 09:30:45 2013
@@ -334,7 +334,8 @@ public class ResourceMetadata extends Ha
         return super.remove(key);
     }
 
-    private Set<Map.Entry<String, Object>> lockedEntrySet;
+    // volatile for correct double-checked locking in getLockedData()
+    private volatile Set<Map.Entry<String, Object>> lockedEntrySet;
     private Set<String> lockedKeySet;
     private Collection<Object> lockedValues;
 



Mime
View raw message