From f7e04918c55a04adea08883fc41a002467d2eceb Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 28 Dec 2015 18:49:27 -0500 Subject: [PATCH] SocketUtils: Fix the multi port function for `0` https://build.spring.io/browse/INT-B43-47 --- .../org/springframework/integration/test/util/SocketUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java b/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java index 363b54889b..6a2b78a1ab 100644 --- a/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java +++ b/spring-integration-test/src/main/java/org/springframework/integration/test/util/SocketUtils.java @@ -94,7 +94,7 @@ public final class SocketUtils { final List openPorts = new ArrayList(numberOfRequestedPorts); - for (int i = seed; i < seed + 200; i++) { + for (int i = seed; i < seed + 200; i = i == 0 ? i : i + 1) { try { ServerSocket sock = ServerSocketFactory.getDefault() .createServerSocket(i, 1, InetAddress.getByName("localhost"));