Skip to content

Commit 5f6500b

Browse files
authored
Fix comparison of BigDecimal values to use compareTo() instead of equals()
1 parent d37a627 commit 5f6500b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/src/main/java/oracle/nosql/driver/values/NumberValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public String toJson(JsonOptions options) {
136136
@Override
137137
public boolean equals(Object other) {
138138
if (other instanceof NumberValue) {
139-
return value.equals(((NumberValue) other).value);
139+
return (value.compareTo(((NumberValue) other).value) == 0);
140140
}
141141
return false;
142142
}

0 commit comments

Comments
 (0)