diff --git a/test/jdk/java/net/HttpURLConnection/HttpURLConWithProxy.java b/test/jdk/java/net/HttpURLConnection/HttpURLConWithProxy.java index 53d74d06c2e..9de4bff1d7b 100644 --- a/test/jdk/java/net/HttpURLConnection/HttpURLConWithProxy.java +++ b/test/jdk/java/net/HttpURLConnection/HttpURLConWithProxy.java @@ -55,7 +55,8 @@ public class HttpURLConWithProxy { // Remove the default nonProxyHosts to use localhost for testing System.setProperty("http.nonProxyHosts", ""); - System.setProperty("http.proxyHost", "1.1.1.1"); + // 240.0.0.0/4 is unallocated and "reserved for future use" (RFC 1112, Section 4) + System.setProperty("http.proxyHost", "240.0.0.1"); System.setProperty("http.proxyPort", "1111"); // Use the logger to help verify the Proxy was used @@ -131,8 +132,9 @@ class MyProxySelector extends ProxySelector { List proxies = new ArrayList<>(); MyProxySelector() { - Proxy p1 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("2.2.2.2", 2222)); - Proxy p2 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("3.3.3.3", 3333)); + // 240.0.0.0/4 is unallocated and "reserved for future use" (RFC 1112, Section 4) + Proxy p1 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("240.0.0.2", 2222)); + Proxy p2 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("240.0.0.3", 3333)); proxies.add(p1); proxies.add(p2); }