[jOOQ/jOOQ#14747] Speed up AbstractRow.equals() and hashCode() when comparing with other AbstractRow
This commit is contained in:
parent
4838334495
commit
ce69995c5f
@ -511,4 +511,23 @@ abstract class AbstractRow<R extends Record> extends AbstractQueryPart implement
|
||||
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// XXX: Object API
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return fields.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that)
|
||||
return true;
|
||||
|
||||
if (that instanceof AbstractRow<?> r)
|
||||
return fields.equals(r.fields);
|
||||
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user