You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2020/06/08 22:11:49 UTC
[maven-surefire] branch SUREFIRE-1796 updated: InetAddress
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a commit to branch SUREFIRE-1796
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/SUREFIRE-1796 by this push:
new 3ca730c InetAddress
3ca730c is described below
commit 3ca730cb68578642dfe88ecad58ea47200dae2b0
Author: tibordigana <ti...@apache.org>
AuthorDate: Tue Jun 9 00:11:39 2020 +0200
InetAddress
---
.../apache/maven/plugin/surefire/extensions/SurefireForkChannel.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
index 9856c16..8d3a54b 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/extensions/SurefireForkChannel.java
@@ -32,7 +32,6 @@ import org.apache.maven.surefire.extensions.util.LineConsumerThread;
import javax.annotation.Nonnull;
import java.io.Closeable;
import java.io.IOException;
-import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketOption;
@@ -87,7 +86,7 @@ final class SurefireForkChannel extends ForkChannel
super( arguments );
server = open( withThreadPool( THREAD_POOL ) );
setTrueOptions( SO_REUSEADDR, TCP_NODELAY, SO_KEEPALIVE );
- InetAddress ip = Inet4Address.getLocalHost();
+ InetAddress ip = InetAddress.getLocalHost();
server.bind( new InetSocketAddress( ip, 0 ), 1 );
InetSocketAddress localAddress = (InetSocketAddress) server.getLocalAddress();
localHost = localAddress.getHostString();