sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefane...@apache.org
Subject svn commit: r1674772 - /sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
Date Mon, 20 Apr 2015 09:31:59 GMT
Author: stefanegli
Date: Mon Apr 20 09:31:59 2015
New Revision: 1674772

URL: http://svn.apache.org/r1674772
Log:
SLING-4638 : 'current' should be volatile - as it is used as communication of isCurrent()
between discovery.impl and customer code (which can be in any other thread) - and so far is
not synchronized in any other way

Modified:
    sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java

Modified: sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java?rev=1674772&r1=1674771&r2=1674772&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
(original)
+++ sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
Mon Apr 20 09:31:59 2015
@@ -40,7 +40,7 @@ public class TopologyViewImpl implements
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
 
     /** Whether or not this topology is considered 'current' / ie currently valid **/
-    private boolean current = true;
+    private volatile boolean current = true;
 
     /** the instances that are part of this topology **/
     private final Set<InstanceDescription> instances = new HashSet<InstanceDescription>();



Mime
View raw message