Andrea C created TINKERPOP-3170:
-----------------------------------
Summary: Majority of steps violate hashcode/equals contracts
Key: TINKERPOP-3170
URL: https://issues.apache.org/jira/browse/TINKERPOP-3170
Project: TinkerPop
Issue Type: Bug
Affects Versions: 3.7.3
Reporter: Andrea C
`AbstractStep.java` is the parent class for all steps which has the following
`equals` method implementation which relies on the hashCode value to determine
equality:
```
@Override
public boolean equals(final Object other) {
return other != null && other.getClass().equals(this.getClass()) &&
this.hashCode() == other.hashCode();
}
```
This is a violation of the hashCode and equals contracts because unequal
objects may have the same hashCode. This reliance on hashCode comparison for
equality can lead to unexpected behaviour and bugs which are difficult to
troubleshoot. Almost all steps use this logic as I can only see 2 which
override the equals method from the abstract parent.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)