Skip to content

Commit eba932a

Browse files
committed
In ClusterSettings, fixed Java doc grammatical error and replaced asList with singletonList
1 parent 1fc66ad commit eba932a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

driver-core/src/main/com/mongodb/connection/ClusterSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
import com.mongodb.selector.ServerSelector;
2323

2424
import java.util.ArrayList;
25-
import java.util.Arrays;
2625
import java.util.Collections;
2726
import java.util.LinkedHashSet;
2827
import java.util.List;
2928
import java.util.concurrent.TimeUnit;
3029

3130
import static com.mongodb.assertions.Assertions.isTrueArgument;
3231
import static com.mongodb.assertions.Assertions.notNull;
32+
import static java.util.Collections.singletonList;
3333

3434
/**
3535
* Settings for the cluster.
@@ -84,7 +84,7 @@ public Builder description(final String description) {
8484
}
8585

8686
/**
87-
* Sets the hosts for the cluster. And duplicate server addresses are removed from the list.
87+
* Sets the hosts for the cluster. Any duplicate server addresses are removed from the list.
8888
*
8989
* @param hosts the seed list of hosts
9090
* @return this
@@ -181,7 +181,7 @@ public Builder maxWaitQueueSize(final int maxWaitQueueSize) {
181181
public Builder applyConnectionString(final ConnectionString connectionString) {
182182
if (connectionString.getHosts().size() == 1 && connectionString.getRequiredReplicaSetName() == null) {
183183
mode(ClusterConnectionMode.SINGLE)
184-
.hosts(Arrays.asList(new ServerAddress(connectionString.getHosts().get(0))));
184+
.hosts(singletonList(new ServerAddress(connectionString.getHosts().get(0))));
185185
} else {
186186
List<ServerAddress> seedList = new ArrayList<ServerAddress>();
187187
for (final String cur : connectionString.getHosts()) {

0 commit comments

Comments
 (0)