We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47c000b commit 71ab784Copy full SHA for 71ab784
2 files changed
bson/src/main/org/bson/types/BsonInt32.java
@@ -41,7 +41,7 @@ public BsonInt32(final int value) {
41
42
@Override
43
public int compareTo(final BsonInt32 o) {
44
- return Integer.compare(value, o.value);
+ return (value < o.value) ? -1 : ((value == o.value) ? 0 : 1);
45
}
46
47
bson/src/main/org/bson/types/BsonInt64.java
@@ -39,7 +39,7 @@ public BsonInt64(final long value) {
39
40
public int compareTo(final BsonInt64 o) {
- return Long.compare(value, o.value);
0 commit comments