diff --git a/src/main/java/de/danielbechler/diff/Configuration.java b/src/main/java/de/danielbechler/diff/Configuration.java index 1a2966a0..67ae4c83 100644 --- a/src/main/java/de/danielbechler/diff/Configuration.java +++ b/src/main/java/de/danielbechler/diff/Configuration.java @@ -260,7 +260,18 @@ else if (includedProperties.contains(node.getPropertyPath())) { return true; } - return false; + else + //Check if any ancestor of this node is in config's included properties + { + Node n = node; + while (!n.isRootNode()) + { + if (includedProperties.contains(n.getParentNode().getPropertyPath())) + return true; + n = n.getParentNode(); + } + return false; + } } public boolean isExcluded(final Node node)