Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9CB6A17B1E for ; Mon, 13 Apr 2015 01:07:25 +0000 (UTC) Received: (qmail 6778 invoked by uid 500); 13 Apr 2015 01:07:25 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 6741 invoked by uid 500); 13 Apr 2015 01:07:25 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 6725 invoked by uid 99); 13 Apr 2015 01:07:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 01:07:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 13 Apr 2015 01:07:04 +0000 Received: (qmail 6425 invoked by uid 99); 13 Apr 2015 01:07:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 01:07:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 71FBBE031B; Mon, 13 Apr 2015 01:07:01 +0000 (UTC) From: ahgittin To: dev@brooklyn.incubator.apache.org Reply-To: dev@brooklyn.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-brooklyn pull request: make ConfigBag thread-safe Content-Type: text/plain Message-Id: <20150413010701.71FBBE031B@git1-us-west.apache.org> Date: Mon, 13 Apr 2015 01:07:01 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user ahgittin commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/589#discussion_r28209984 --- Diff: core/src/main/java/brooklyn/util/config/ConfigBag.java --- @@ -96,14 +102,42 @@ public static ConfigBag newInstanceCopying(final ConfigBag configBag) { * (note: this applies even for values which are overridden and the overridden value is used); * however subsequent uses in the original set will not be marked here */ - public static ConfigBag newInstanceExtending(final ConfigBag configBag, Map flags) { + @Beta + public static ConfigBag newInstanceExtending(final ConfigBag parentBag) { + return new ConfigBagExtendingParent(parentBag).copy(parentBag); + } + + /** @see #newInstanceExtending(ConfigBag) */ + public static class ConfigBagExtendingParent extends ConfigBag { + ConfigBag parentBag; + private ConfigBagExtendingParent(ConfigBag parentBag) { + this.parentBag = parentBag; --- End diff -- and do in constructor --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---