File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
test/jdk/java/nio/channels/DatagramChannel Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public static void main(String[] args) throws IOException {
5252 if (IPSupport .hasIPv4 ()) {
5353 // test with IPv4 only
5454 try (DatagramChannel dc = DatagramChannel .open (StandardProtocolFamily .INET )) {
55- InetAddress lo4 = InetAddress .ofLiteral ("127.0.0.1" );
55+ InetAddress lo4 = InetAddress .getByName ("127.0.0.1" );
5656 System .out .println ("Testing with INET family and " + lo4 );
5757 test (dc , lo4 );
5858 test (dc , lo4 );
@@ -62,7 +62,7 @@ public static void main(String[] args) throws IOException {
6262 if (IPSupport .hasIPv6 ()) {
6363 // test with IPv6 only
6464 try (DatagramChannel dc = DatagramChannel .open (StandardProtocolFamily .INET6 )) {
65- InetAddress lo6 = InetAddress .ofLiteral ("::1" );
65+ InetAddress lo6 = InetAddress .getByName ("::1" );
6666 System .out .println ("Testing with INET6 family and " + lo6 );
6767 test (dc , lo6 );
6868 test (dc , lo6 );
You can’t perform that action at this time.
0 commit comments