3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 10:35:33 +00:00

Since classes are non-final "instanceof" check is better in #equals

This commit is contained in:
George Karpenkov 2016-01-06 11:27:58 +01:00
parent 529b9d6833
commit f93c41b1be
4 changed files with 4 additions and 8 deletions

View file

@ -31,9 +31,8 @@ public class Sort extends AST
@Override
public boolean equals(Object o)
{
if (o == null) return false;
if (o == this) return true;
if (o.getClass() != this.getClass()) return false;
if (!(o instanceof Sort)) return false;
Sort other = (Sort) o;
return (getContext().nCtx() == other.getContext().nCtx()) &&