Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test/jdk/java/net/InetAddress/ptr/Lookup.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2025, 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
Expand Down Expand Up @@ -46,6 +46,7 @@

import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jtreg.SkippedException;

public class Lookup {
private static final String HOST = "icann.org";
Expand Down Expand Up @@ -91,8 +92,7 @@ public static void main(String args[]) throws IOException {
String tmp = lookupWithIPv4Prefer();
System.out.println("IPv4 lookup results: [" + tmp + "]");
if (SKIP.equals(tmp)) {
System.out.println(HOST + " can't be resolved - test skipped.");
return;
throw new SkippedException(HOST + " can't be resolved - test skipped.");
}

String[] strs = tmp.split(":");
Expand All @@ -104,8 +104,7 @@ public static void main(String args[]) throws IOException {
tmp = reverseWithIPv4Prefer(addr);
System.out.println("IPv4 reverse lookup results: [" + tmp + "]");
if (SKIP.equals(tmp)) {
System.out.println(addr + " can't be resolved with preferIPv4 - test skipped.");
return;
throw new SkippedException(addr + " can't be resolved with preferIPv4 - test skipped.");
}

strs = tmp.split(":");
Expand Down