I think it can be simplified into:
```java
traversal.getSteps().stream().filter(step -> step instanceof
TraversalParent).forEach(step -> {
for (final Traversal.Admin<?, ?> local : ((TraversalParent)
step).getLocalChildren()) {
applyTraversalRecursively(consumer, local);
}
for (final Traversal.Admin<?, ?> global : ((TraversalParent)
step).getGlobalChildren()) {
applyTraversalRecursively(consumer, global);
}
});
```
I'm not sure I understand why you were getting concurrent modification
exception.
[ Full content available at: https://github.com/apache/tinkerpop/pull/1211 ]
This message was relayed via gitbox.apache.org for [email protected]