Skip to content
Prev Previous commit
Next Next commit
fix checkstyle
  • Loading branch information
joykim1005 committed Jan 15, 2025
commit 71ea834d5cb16e36fdfae437a261b98838b0cd33
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -71,7 +70,7 @@ private Collection<ServerAddress> applySrvMaxHosts(final Collection<ServerAddres
return activeHosts;
}

private List<ServerAddress> getActivePriorHosts(Collection<ServerAddress> latestSrvHosts) {
private List<ServerAddress> getActivePriorHosts(final Collection<ServerAddress> latestSrvHosts) {
List<ServerAddress> priorHosts = DnsMultiServerCluster.this.getCurrentDescription().getServerDescriptions().stream()
.map(ServerDescription::getAddress).collect(Collectors.toList());
priorHosts.removeIf(host -> !latestSrvHosts.contains(host));
Expand All @@ -80,7 +79,7 @@ private List<ServerAddress> getActivePriorHosts(Collection<ServerAddress> latest
}

private List<ServerAddress> addShuffledHosts(final Collection<ServerAddress> latestSrvHosts,
List<ServerAddress> activePriorHosts, int numNewHostsToAdd) {
final List<ServerAddress> activePriorHosts, final int numNewHostsToAdd) {
List<ServerAddress> addedHosts = new ArrayList<>(latestSrvHosts);
addedHosts.removeAll(activePriorHosts);
Collections.shuffle(addedHosts, ThreadLocalRandom.current());
Expand Down