[java] Reverting unwanted change
@@ -100,7 +100,7 @@ private static int checkPortIsFree(int port) {
socket.bind(new InetSocketAddress("localhost", port));
return socket.getLocalPort();
} catch (IOException e) {
- return port;
+ return -1;
}
}
