diff --git a/jdk/test/java/net/Socks/SocksProxyVersion.java b/jdk/test/java/net/Socks/SocksProxyVersion.java index bc46c423a09..27bd1872d40 100644 --- a/jdk/test/java/net/Socks/SocksProxyVersion.java +++ b/jdk/test/java/net/Socks/SocksProxyVersion.java @@ -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(); }