spmallette commented on a change in pull request #1502:
URL: https://github.com/apache/tinkerpop/pull/1502#discussion_r756232393
##########
File path:
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/DefaultTraversal.java
##########
@@ -193,7 +193,9 @@ public void applyStrategies() throws IllegalStateException {
@Override
public boolean hasNext() {
if (!this.locked) this.applyStrategies();
- return this.lastTraverser.bulk() > 0L || this.finalEndStep.hasNext();
+ final boolean more = this.lastTraverser.bulk() > 0L ||
this.finalEndStep.hasNext();
+ if (!more) CloseableIterator.closeIterator(this);
Review comment:
the other terminal steps tend to call `fill()` which performs a close
properly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]