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

    https://github.com/apache/tinkerpop/pull/882#discussion_r207191097
  
    --- Diff: 
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Traversal.java
 ---
    @@ -496,15 +496,17 @@ public default void reset() {
             public void setGraph(final Graph graph);
     
             public default boolean equals(final Traversal.Admin<S, E> other) {
    -            final List<Step> steps = this.getSteps();
    -            final List<Step> otherSteps = other.getSteps();
    -            if (steps.size() == otherSteps.size()) {
    -                for (int i = 0; i < steps.size(); i++) {
    -                    if (!steps.get(i).equals(otherSteps.get(i))) {
    -                        return false;
    +            if (this.getClass().equals(other.getClass())) {
    --- End diff --
    
    I guess this changes makes sense. Are you sure there was no reason why we 
didn't have it that way to begin with? Just playing devil's advocate, but 
should `Traversal` equality in some way be based on the steps the traversal 
contains rather than the class it has?


---

Reply via email to