8203297: java/net/URL/OpenStream.java fails intermittently
authorchegar
Thu, 24 May 2018 15:23:28 +0100
changeset 50252 c3c6cae9d480
parent 50251 dc01f2104e46
child 50253 7a7285477153
8203297: java/net/URL/OpenStream.java fails intermittently Reviewed-by: alanb, dfuchs
test/jdk/java/net/URL/OpenStream.java
--- a/test/jdk/java/net/URL/OpenStream.java	Thu May 24 15:46:04 2018 +0200
+++ b/test/jdk/java/net/URL/OpenStream.java	Thu May 24 15:23:28 2018 +0100
@@ -55,7 +55,7 @@
     static void checkThrows(String url) throws IOException {
         URL u = new URL(url);
         try {
-            InputStream in = u.openStream();
+            InputStream in = u.openConnection(Proxy.NO_PROXY).getInputStream();
         } catch (UnknownHostException x) {
             System.out.println("UnknownHostException is thrown as expected.");
             return;