Skip to content

Commit

Permalink
#84 Fix dependency filtering
Browse files Browse the repository at this point in the history
In case the global filter excludes a node, graph traversal should
continue. Otherwise dependencies that are not excluded will not be
visited at all.
  • Loading branch information
ferstl committed Sep 26, 2018
1 parent 2a78760 commit 11694a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -54,7 +54,7 @@ class GraphBuildingVisitor implements DependencyVisitor {
public boolean visitEnter(org.eclipse.aether.graph.DependencyNode node) {
DependencyNode node1 = new DependencyNode(node);
if (isExcluded(node1)) {
return false;
return true;
}

this.nodeStack.push(node1);
Expand Down
Expand Up @@ -31,7 +31,6 @@
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static java.util.EnumSet.allOf;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -118,7 +117,7 @@ public void ignoredNode() {
assertTrue(visitor.visitLeave(child1));

// Don't process any further children of child2
assertFalse(visitor.visitEnter(child2));
assertTrue(visitor.visitEnter(child2));
assertTrue(visitor.visitLeave(child2));

assertThat(this.graphBuilder, hasNodesAndEdges(
Expand Down

0 comments on commit 11694a5

Please sign in to comment.