Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C3E9317FBD for ; Mon, 20 Apr 2015 09:31:59 +0000 (UTC) Received: (qmail 43715 invoked by uid 500); 20 Apr 2015 09:31:59 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 43658 invoked by uid 500); 20 Apr 2015 09:31:59 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 43647 invoked by uid 99); 20 Apr 2015 09:31:59 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2015 09:31:59 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 8E26FAC006E for ; Mon, 20 Apr 2015 09:31:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@sling.apache.org From: stefanegli@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150420093159.8E26FAC006E@hades.apache.org> 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 instances = new HashSet();