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

    https://github.com/apache/tinkerpop/pull/882#discussion_r207374407
  
    --- 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 don't think so. The main reason why I had to change it was that 
traversals without steps were considered equal using the old method. That means 
all `TrueTraversal`, `ConstantTraversal`, `ValueTraversal`, etc. instances were 
equal compared to each other.


---

Reply via email to