Github user bdeggleston commented on a diff in the pull request: https://github.com/apache/cassandra/pull/224#discussion_r198213823 --- Diff: src/java/org/apache/cassandra/locator/Replicas.java --- @@ -50,6 +50,30 @@ public abstract int size(); protected abstract Collection<Replica> getUnmodifiableCollection(); + + public boolean equals(Object o) --- End diff -- Good point on set/list equality. Reverted. > We should never return a Replicas that isn't either an instance of either ReplicaSet or ReplicaList Why not? The methods that return the immutable containers are basically just returning transformed views of their arguments. The fact that they return generic `ReplicaCollection` instances is a pretty clear indicator that you can't expect them to behave like lists or sets.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org