added cached hashcode check to equals
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 6812]
This commit is contained in:
parent
2646c177b1
commit
2faaf7bc7f
|
@ -100,6 +100,9 @@ public class NFAContext {
|
|||
*/
|
||||
public boolean equals(Object o) {
|
||||
NFAContext other = ((NFAContext)o);
|
||||
if ( this.cachedHashCode != other.cachedHashCode ) {
|
||||
return false; // can't be same if hash is different
|
||||
}
|
||||
if ( this==other ) return true;
|
||||
|
||||
// System.out.println("comparing "+this+" with "+other);
|
||||
|
|
Loading…
Reference in New Issue