You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by st...@apache.org on 2015/04/20 11:31:59 UTC
svn commit: r1674772 -
/sling/trunk/bundles/extensions/discovery/impl/src/main/java/org/apache/sling/discovery/impl/topology/TopologyViewImpl.java
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>();