Add equals/hashCode support for Unpaged.

Closes #3061
This commit is contained in:
Mark Paluch
2024-03-12 13:56:14 +01:00
parent aec8f1a45a
commit ce368882f4
2 changed files with 22 additions and 0 deletions

View File

@@ -89,4 +89,21 @@ final class Unpaged implements Pageable {
throw new UnsupportedOperationException();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Unpaged unpaged)) {
return false;
}
return sort.equals(unpaged.sort);
}
@Override
public int hashCode() {
return sort.hashCode();
}
}