changeset 50836:c3c6cae9d480

8203297: java/net/URL/OpenStream.java fails intermittently Reviewed-by: alanb, dfuchs
author chegar
date Thu, 24 May 2018 15:23:28 +0100
parents dc01f2104e46
children 7a7285477153
files test/jdk/java/net/URL/OpenStream.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;