This is an automated email from the ASF dual-hosted git repository.

colegreer pushed a commit to branch repeatLimit
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 2fbda208288ef6f44ea049750de0098975332887
Author: Andrea Child <andrea.ch...@improving.com>
AuthorDate: Tue Sep 2 11:42:25 2025 -0700

    Revert changes to StringFactory. Fixed bug with loop name.
---
 .../gremlin/process/traversal/step/branch/RepeatStep.java         | 4 ++--
 .../gremlin/process/traversal/step/filter/RangeGlobalStep.java    | 8 ++++----
 .../apache/tinkerpop/gremlin/structure/util/StringFactory.java    | 7 +------
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
index ed26d2634e..b1af408f79 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatStep.java
@@ -239,9 +239,9 @@ public final class RepeatStep<S> extends 
ComputerAwareStep<S, S> implements Trav
                 final Traverser.Admin<S> start = this.starts.next();
                 String ln;
                 if (this.loopName != null) {
-                    ln = this.getId();
-                } else {
                     ln = this.loopName;
+                } else {
+                    ln = this.getId();
                 }
                 start.initialiseLoops(this.getId(), ln);
                 if (doUntil(start, true)) {
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
index b5ed20db43..2be2a7da1a 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
@@ -90,15 +90,15 @@ public final class RangeGlobalStep<S> extends FilterStep<S> 
implements Ranging,
             String iterationKey = sb.toString();
             Object vId = ((Vertex) traverser.get()).property("id").value();
             currentCounter = 
perIterationCounters.computeIfAbsent(iterationKey, k -> new AtomicLong(0L));
-            System.out.printf("IterationKey: %s Traverser: %s Path: %s 
Counter: %s High: %s%n", iterationKey, vId, traverser.path(), 
currentCounter.get(), this.high);
+            // System.out.printf("IterationKey: %s Traverser: %s Path: %s 
Counter: %s High: %s%n", iterationKey, vId, traverser.path(), 
currentCounter.get(), this.high);
         }
 
         if (this.high != -1 && currentCounter.get() >= this.high) {
             if (usePerIterationCounters) {
-                System.out.printf("Filter false for Traverser: %s Counter: 
%d%n", traverser.path(), currentCounter.get());
+                // System.out.printf("Filter false for Traverser: %s Counter: 
%d%n", traverser.path(), currentCounter.get());
                 return false;
             }
-            System.out.printf("FastNoSuchElementException for Traverser: %s 
Counter: %d%n", traverser.path(), currentCounter.get());
+            // System.out.printf("FastNoSuchElementException for Traverser: %s 
Counter: %d%n", traverser.path(), currentCounter.get());
             throw FastNoSuchElementException.instance();
         }
 
@@ -106,7 +106,7 @@ public final class RangeGlobalStep<S> extends FilterStep<S> 
implements Ranging,
         if (currentCounter.get() + avail <= this.low) {
             // Will not surpass the low w/ this traverser. Skip and filter the 
whole thing.
             currentCounter.getAndAdd(avail);
-            System.out.printf("False for Traverser: %s Counter: %d%n", 
traverser.path(), currentCounter.get());
+            // System.out.printf("False for Traverser: %s Counter: %d%n", 
traverser.path(), currentCounter.get());
             return false;
         }
 
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java
index 23ac3d831c..49206cf8e3 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/StringFactory.java
@@ -268,11 +268,6 @@ public final class StringFactory {
     }
 
     public static String pathString(final Path path) {
-        return PATH + L_BRACKET + String.join(", ", IteratorUtils.map(path, p 
-> {
-            if (p instanceof Vertex) {
-                return ((Vertex) p).property("id").value().toString();
-            }
-            return Objects.toString(p);
-        })) + R_BRACKET;
+        return PATH + L_BRACKET + String.join(", ", IteratorUtils.map(path, 
Objects::toString)) + R_BRACKET;
     }
 }

Reply via email to