spmallette commented on code in PR #1929: URL: https://github.com/apache/tinkerpop/pull/1929#discussion_r1063381736
########## gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/iterator/IteratorUtils.java: ########## @@ -163,6 +192,7 @@ public static <K, S, V> Map<K, V> collectMap(final Iterator<S> iterator, final F final S obj = iterator.next(); map.put(key.apply(obj), value.apply(obj)); } + CloseableIterator.closeIterator(iterator); Review Comment: i guess the idea here is to just close the iterator as close as possible to where it was exhausted? -- 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: commits-unsubscr...@tinkerpop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org