File tree 2 files changed +17
-12
lines changed
lib/src/main/java/io/cloudquery/scalar
2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -49,19 +49,13 @@ public void setValue(Object value) throws ValidationException {
49
49
50
50
@ Override
51
51
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
+ }
56
+ return Arrays .equals (this .value , o .value );
54
57
}
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 );
58
+ return false ;
65
59
}
66
60
67
61
public static class LargeBinary extends Binary {
Original file line number Diff line number Diff line change @@ -49,6 +49,17 @@ public void setValue(Object value) throws ValidationException {
49
49
throw new ValidationException (ValidationException .NO_CONVERSION_AVAILABLE , this .dataType (), value );
50
50
}
51
51
52
+ @ Override
53
+ public final boolean equals (Object other ) {
54
+ if (other instanceof UUID o ) {
55
+ if (this .value == null ) {
56
+ return o .value == null ;
57
+ }
58
+ return this .value .equals (o .value );
59
+ }
60
+ return false ;
61
+ }
62
+
52
63
@ Override
53
64
public final int hashCode () {
54
65
return Objects .hash (value );
You can’t perform that action at this time.
0 commit comments