8023555: test/java/net/Socks/SocksProxyVersion.java fails when machine name is localhost

Reviewed-by: chegar, alanb
This commit is contained in:
Tristan Yan 2013-10-14 11:47:54 +01:00
parent f573ee1917
commit 904f946258

View File

@ -41,6 +41,10 @@ public class SocksProxyVersion implements Runnable {
volatile boolean failed;
public static void main(String[] args) throws Exception {
if (InetAddress.getLocalHost().isLoopbackAddress()) {
System.out.println("Test cannot run. getLocalHost returns a loopback address");
return;
}
new SocksProxyVersion();
}