Github user ahgittin commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/440#discussion_r90010996 --- Diff: core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java --- @@ -163,13 +163,18 @@ public ConfigBag getLocalConfigBag() { return putAllOwnConfigIntoSafely(ConfigBag.newInstance()).seal(); } - public Object setConfig(ConfigKey<?> key, Object v) { - Object val = coerceConfigVal(key, v); + public Object setConfig(final ConfigKey<?> key, Object v) { + // Use our own key for writing, (e.g. in-case it should (or should not) be a structured key like MapConfigKey). + // This is same logic as for getConfig, except we only have to look at our own container. + ConfigKey<?> ownKey = getKeyAtContainer(getContainer(), key); + if (ownKey==null) ownKey = key; + + Object val = coerceConfigVal(ownKey, v); --- End diff -- is there any harm in coercing best-effort on config puts additionally?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---