Github user neykov commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/333#discussion_r20403376
  
    --- Diff: 
core/src/main/java/brooklyn/entity/rebind/dto/BasicEntityMemento.java ---
    @@ -180,12 +186,22 @@ protected BasicEntityMemento(Builder builder) {
             return staticConfigKeys;
         }
     
    +    final static String LEGACY_KEY_DESCRIPTION = "This item was defined in 
a different version of this blueprint; metadata unavailable here.";
    +    
         protected ConfigKey<?> getConfigKey(String key) {
    +        ConfigKey<?> result = null;
             if (configKeys!=null) {
    -            ConfigKey<?> ck = configKeys.get(key);
    -            if (ck!=null) return ck;
    +            result = configKeys.get(key);
    +            if (result!=null && 
!LEGACY_KEY_DESCRIPTION.equals(result.getDescription()))
    +                    return result;
             }
    -        return getStaticConfigKeys().get(key);
    +        ConfigKey<?> resultStatic = getStaticConfigKeys().get(key);
    +        if (resultStatic!=null) return resultStatic;
    +        // if it was a legacy key, if it is added back, drop the legacy 
reference
    +        if (result!=null) return result;
    +        // can happen on rebind if a key has gone away; it will not be 
declared in the file or in the 
    --- End diff --
    
    Unfinished sentence.


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

Reply via email to