+1

-- daniel

On 23/05/2018 16:43, Chris Hegarty wrote:
This is a review for a trivial change to a test to make it more robust on
platforms, Mac, where system proxies are used by HttpURLConnection,
by default.  This test should never use a proxy.

https://bugs.openjdk.java.net/browse/JDK-8203297

diff --git a/test/jdk/java/net/URL/OpenStream.java 
b/test/jdk/java/net/URL/OpenStream.java
--- a/test/jdk/java/net/URL/OpenStream.java
+++ b/test/jdk/java/net/URL/OpenStream.java
@@ -31,19 +31,19 @@
public class OpenStream { static String badHttp = "http://foo.bar.baz/";; public static void main(String[] args) throws IOException { URL u = new URL(badHttp);
          try {
-            InputStream in = u.openStream();
+            InputStream in = u.openConnection(Proxy.NO_PROXY).getInputStream();
          } catch (IOException x) {
              return;
          }
          throw new RuntimeException("Expected UnknownHostException to be 
thrown");
} }

-Chris.


Reply via email to