Skip to content

Commit ad5656f

Browse files
SendaoYanjerboaa
authored andcommitted
8338748: [17u,21u] Test Disconnect.java compile error: cannot find symbol after JDK-8299813
Reviewed-by: sgehwolf
1 parent 40fe61a commit ad5656f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/jdk/java/nio/channels/DatagramChannel/Disconnect.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)