--- a/test/jdk/com/sun/net/httpserver/bugs/6725892/Test.java Tue Jan 15 15:59:47 2019 -0800
+++ b/test/jdk/com/sun/net/httpserver/bugs/6725892/Test.java Wed Feb 27 13:34:40 2019 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -96,7 +96,7 @@
static void test1() throws IOException {
failed = false;
- Socket s = new Socket ("127.0.0.1", port);
+ Socket s = new Socket (InetAddress.getLoopbackAddress(), port);
InputStream is = s.getInputStream();
// server should close connection after 2 seconds. We wait up to 10
s.setSoTimeout (10000);