Github user okram commented on a diff in the pull request:

    https://github.com/apache/tinkerpop/pull/548#discussion_r98930854
  
    --- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/FlatMapStep.java
 ---
    @@ -44,6 +45,7 @@ public FlatMapStep(final Traversal.Admin traversal) {
                     return this.head.split(this.iterator.next(), this);
                 } else {
                     this.head = this.starts.next();
    +                closeIterator();
    --- End diff --
    
    This should go before `this.starts.next()` as if `this.starts.next()` is 
empty, it will throw `FastNoSuchElementException` and the previous iterator 
would not have been closed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to