private Map getInheritedProperties()

in src/main/java/org/apache/sling/caconfig/impl/def/DefaultConfigurationInheritanceStrategy.java [90:104]


    private Map<String,Object> getInheritedProperties(Map<String,Object> parentProps, Iterator<Resource> inheritanceChain) {
        if (!inheritanceChain.hasNext()) {
            return parentProps;
        }
        Resource next = inheritanceChain.next();
        log.trace("! Property inheritance: Merge with properties from {}", next.getPath());
        Map<String,Object> merged = new HashMap<>(next.getValueMap());
        merged.putAll(parentProps);
        if (isPropertyInheritance(next)) {
            return getInheritedProperties(merged, inheritanceChain);
        }
        else {
            return merged;
        }
    }