FlorianHockmann commented on code in PR #2424:
URL: https://github.com/apache/tinkerpop/pull/2424#discussion_r1441466689


##########
gremlin-dotnet/src/Gremlin.Net/Process/Traversal/DefaultTraversal.cs:
##########
@@ -82,21 +82,22 @@ public bool MoveNext()
         }
         
         private bool MoveNextInternal()
-        {                   
+        {
             if (_fetchedNext) return _nextAvailable;
+
+            if (!_nextAvailable || _nextAvailable && 
TraverserEnumerator.Current?.Bulk == 0)

Review Comment:
   @EricSites sure, but `DefaultTraversal` is an `IEnumerator` itself so 
`GetCurrent()` just forwards to `TraverserEnumerator.Current`. If it's illegal 
to call `TraverserEnumerator.Current` before calling 
`TraverserEnumerator.MoveNext()`, then it's also illegal to call `GetCurrent()` 
before calling `MoveNext()`.
   We could of course use a flag to check whether enumeration has been started 
in `GetCurrent()` and return `null` otherwise, but I don't think it's a good 
idea to deviate from the default behavior of .NET enumerators.
   
   Did you see `GetCurrent()` in any stack trace?



-- 
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]

Reply via email to