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

    https://github.com/apache/brooklyn-server/pull/462#discussion_r93231733
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java
 ---
    @@ -397,48 +397,83 @@ protected ConfigInheritance 
getDefaultRuntimeInheritance() {
     
             final InheritanceContext context = 
InheritanceContext.RUNTIME_MANAGEMENT;
             ConfigInheritance currentInheritance = 
ConfigInheritances.findInheritance(queryKey, context, 
getDefaultRuntimeInheritance());
    -        
    +
             BasicConfigValueAtContainer<TContainer, Object> last = null;
    -        
    +
             while (c!=null) {
                 Maybe<Object> v = getRawValueAtContainer(c, queryKey);
                 BasicConfigValueAtContainer<TContainer, Object> next = new 
BasicConfigValueAtContainer<TContainer, Object>(c, getKeyAtContainer(c, 
queryKey), v);
    -            
    +
                 if (last!=null && !currentInheritance.considerParent(last, 
next, context)) break;
    -            
    +
                 ConfigInheritance currentInheritanceExplicit = 
ConfigInheritances.findInheritance(next.getKey(), 
InheritanceContext.RUNTIME_MANAGEMENT, null);
                 if (currentInheritanceExplicit!=null) {
                     if (count>0 && 
!currentInheritanceExplicit.isReinheritable(next, context)) break;
                     currentInheritance = currentInheritanceExplicit;
                 }
    -            
    +
                 if (next.isValueExplicitlySet()) result.add(0, next);
     
                 last = next;
                 c = getParentOfContainer(c);
                 count++;
             }
    -        
    +
             return result;
         }
    -    
    -    @Override
    +
    +    @Override @Deprecated
         public Set<ConfigKey<?>> findKeys(Predicate<? super ConfigKey<?>> 
filter) {
    +        return findKeys(filter, KeyFindingMode.PRESENT_NOT_RESOLVED);
    +    }
    +
    +    @Override
    +    public Set<ConfigKey<?>> findKeysDeclared(Predicate<? super 
ConfigKey<?>> filter) {
    +        return findKeys(filter, KeyFindingMode.DECLARED_OR_PRESENT);
    +    }
    +
    +    @Override
    +    public Set<ConfigKey<?>> findKeysPresent(Predicate<? super 
ConfigKey<?>> filter) {
    +        return findKeys(filter, KeyFindingMode.PRESENT_BUT_RESOLVED);
    +    }
    +
    +    protected enum KeyFindingMode { DECLARED_OR_PRESENT, 
PRESENT_BUT_RESOLVED, PRESENT_NOT_RESOLVED }
    --- End diff --
    
    Maybe `PRESENT_BUT_RESOLVED` could be called instead 
`PRESENT_AND_RESOLVED`? Does that convey the sense better?


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

Reply via email to