brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request: Merge Map values in config
Date Mon, 23 May 2016 11:29:45 GMT
Github user neykov commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/151#discussion_r64207206
  
    --- Diff: core/src/main/java/org/apache/brooklyn/util/core/config/ConfigBag.java ---
    @@ -126,7 +127,11 @@ public void markUsed(String key) {
         /** As {@link #newInstanceExtending(ConfigBag)} but also putting the supplied values.
*/
         @Beta
         public static ConfigBag newInstanceExtending(final ConfigBag configBag, Map<?,?>
optionalAdditionalValues) {
    -        return newInstanceExtending(configBag).putAll(optionalAdditionalValues);
    +        if (optionalAdditionalValues != null) {
    +            return newInstance(CollectionHelpers.mergeNestedMaps(configBag.getAllConfig(),
(Map<String, Object>) optionalAdditionalValues));
    +        } else {
    +            return newInstanceExtending(configBag);
    +        }
    --- End diff --
    
    I think we shouldn't do this, too intrusive. Better make the merging behaviour specific
to `provisioning.properties`.


---
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.
---

Mime
View raw message