From 47289b51bdac58c758b37f27c89fc4eb0f052fe6 Mon Sep 17 00:00:00 2001 From: Naoto Sato Date: Thu, 9 Jan 2025 14:40:31 -0800 Subject: [PATCH] Addresses review comments --- .../jlink/plugins/IncludeLocalesPluginTest.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java b/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java index 0cbfe468ac848..f30adee80a3c6 100644 --- a/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java +++ b/test/jdk/tools/jlink/plugins/IncludeLocalesPluginTest.java @@ -46,6 +46,8 @@ import org.junit.jupiter.params.provider.MethodSource; import static org.junit.jupiter.api.Assertions.fail; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; /* * @test @@ -413,9 +415,7 @@ public static void setup() throws IOException { "present."); helper = Helper.newHelper(isLinkableRuntime); - if (helper == null) { - fail("Helper could not be initialized"); - } + assertNotNull(helper, "Helper could not be initialized"); } @ParameterizedTest @@ -480,11 +480,8 @@ private static void testAvailableLocales(Path image, List availableLocal + (len < availableLocales.size() ? " ..." : ""); int status = proc.waitFor(); - if (status == 0) { - System.out.println("\tDone\t" + command); - } else { - fail("\tExit " + status + "\t" + command); - } + assertTrue(status == 0, "\tExit " + status + "\t" + command); + System.out.println("\tDone\t" + command); System.out.println(); } }