-
Notifications
You must be signed in to change notification settings - Fork 814
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19add74
commit 8a7049f
Showing
3 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,7 +149,16 @@ public void applyStrategies() throws IllegalStateException { | |
final Iterator<TraversalStrategy<?>> strategyIterator = this.strategies.iterator(); | ||
while (strategyIterator.hasNext()) { | ||
final TraversalStrategy<?> strategy = strategyIterator.next(); | ||
TraversalHelper.applyTraversalRecursively(strategy::apply, this); | ||
TraversalHelper.applyTraversalRecursively(t -> { | ||
strategy.apply(t); | ||
|
||
// after the strategy is applied, it may have modified the traversal where a new traversal object | ||
// was added. if the strategy didn't set the Graph object it could leave that new traversal in a | ||
// state where another strategy might fail if that dependency is not satisfied | ||
TraversalHelper.applyTraversalRecursively(i -> { | ||
if (hasGraph) i.setGraph(this.graph); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
spmallette
Author
Contributor
|
||
}, this); | ||
}, this); | ||
} | ||
|
||
// don't need to re-apply strategies to "this" - leads to endless recursion in GraphComputer. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since called setGraph() for every Traversal here, we don't need to call setGraph() again at line 166?