Skip to content

Commit 140fe5b

Browse files
author
Alexandre Dutra
committed
Fix incorrect comparison in QueryOptions.equals()
1 parent 7ec9cb6 commit 140fe5b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ public int getMaxPendingRefreshNodeRequests() {
475475
return maxPendingRefreshNodeRequests;
476476
}
477477

478+
@Override
478479
public boolean equals(Object that) {
479480
if (that == null || !(that instanceof QueryOptions)) {
480481
return false;
@@ -494,9 +495,10 @@ public boolean equals(Object that) {
494495
&& this.refreshNodeIntervalMillis == other.refreshNodeIntervalMillis
495496
&& this.refreshSchemaIntervalMillis == other.refreshSchemaIntervalMillis
496497
&& this.reprepareOnUp == other.reprepareOnUp
497-
&& this.prepareOnAllHosts == prepareOnAllHosts);
498+
&& this.prepareOnAllHosts == other.prepareOnAllHosts);
498499
}
499500

501+
@Override
500502
public int hashCode() {
501503
return MoreObjects.hashCode(
502504
consistency,

0 commit comments

Comments
 (0)