Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/483#discussion_r23761714
--- Diff: core/src/main/java/brooklyn/entity/basic/EntityConfigMap.java ---
@@ -257,17 +282,35 @@ public void setInheritedConfig(Map<ConfigKey<?>, ?
extends Object> vals, ConfigB
ConfigKey<?> key = renamedConfigKeys.get(name);
if (key == null) key =
entity.getEntityType().getConfigKey(name);
if (key != null) {
- if (inheritedConfig.containsKey(key)) {
+ if (!isInherited(key)) {
+ // no-op
+ } else if (inheritedConfig.containsKey(key)) {
LOG.warn("Entity "+entity+" inherited duplicate config
for key "+key+", via explicit config and string name "+name+"; using value of
key");
} else {
inheritedConfig.put(key, value);
}
} else {
+ // a config bag has discarded the keys, so we must assume
default inheritance for things given that way
+ // unless we can infer a key; not a big deal, as we should
have the key in inheritedConfig for everything
+ // which originated with a key ... but still, it would be
nice to clean up the use of config bag!
inheritedConfigBag.putStringKey(name, value);
}
}
}
+ private Map<ConfigKey<?>, ?> filterUninheritable(Map<ConfigKey<?>, ?>
valsO) {
--- End diff --
was some mindless bugfixing, using yours now
---
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 [email protected] or file a JIRA ticket
with INFRA.
---