Skip to content

Commit 7569573

Browse files
Cosmetics
1 parent a975c3e commit 7569573

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.io.IOException;
2020
import java.security.KeyManagementException;
2121
import java.security.NoSuchAlgorithmException;
22+
import java.util.Collections;
2223
import java.util.Map;
2324
import java.util.concurrent.*;
2425
import java.util.List;
@@ -756,7 +757,7 @@ public ConnectionParams params(ExecutorService consumerWorkServiceExecutor) {
756757
* @throws IOException if it encounters a problem
757758
*/
758759
public Connection newConnection() throws IOException, TimeoutException {
759-
return newConnection(this.sharedExecutor, Arrays.asList(new Address(getHost(), getPort())));
760+
return newConnection(this.sharedExecutor, Collections.singletonList(new Address(getHost(), getPort())));
760761
}
761762

762763
/**
@@ -771,7 +772,7 @@ public Connection newConnection() throws IOException, TimeoutException {
771772
* @throws IOException if it encounters a problem
772773
*/
773774
public Connection newConnection(ExecutorService executor) throws IOException, TimeoutException {
774-
return newConnection(executor, Arrays.asList(new Address(getHost(), getPort())));
775+
return newConnection(executor, Collections.singletonList(new Address(getHost(), getPort())));
775776
}
776777

777778
@Override public ConnectionFactory clone(){

0 commit comments

Comments
 (0)