Skip to content

Commit 779fe3f

Browse files
committed
fix custom eq
1 parent 0c8e34c commit 779fe3f

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

lib/src/main/java/io/cloudquery/scalar/Binary.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,12 @@ public void setValue(Object value) throws ValidationException {
4949

5050
@Override
5151
public boolean equals(Object other) {
52-
if (!(other instanceof Binary o)) {
53-
return false;
52+
if (other instanceof Binary o) {
53+
if (this.value == null) {
54+
return o.value == null;
55+
} return Arrays.equals(this.value, o.value);
5456
}
55-
56-
if (!o.getClass().equals(this.getClass())) {
57-
return false;
58-
}
59-
60-
if (this.value == null) {
61-
return o.value == null;
62-
}
63-
64-
return Arrays.equals(this.value, o.value);
57+
return false;
6558
}
6659

6760
public static class LargeBinary extends Binary {

0 commit comments

Comments
 (0)