diff --git a/TestTranslations.java b/TestTranslations.java index f6a4fe2..66d0d6f 100644 --- a/TestTranslations.java +++ b/TestTranslations.java @@ -1,5 +1,5 @@ /* TestTranslations -- Ensure translations are available for new timezones - Copyright (C) 2022 Red Hat, Inc. + Copyright (C) 2026 Red Hat, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as @@ -60,15 +60,34 @@ public class TestTranslations { public static void main(String[] args) { + boolean debug = false; + if (args.length < 1) { System.err.println("Test must be started with the name of the locale provider."); System.exit(1); } + if (args.length > 1) { + debug = Boolean.parseBoolean(args[1]); + } + + System.err.printf("Debugging: %s\n", debug); + + testZoneStrings(debug); + + String localeProvider = args[0]; + testZone(localeProvider, KYIV, + new String[] { "Europe/Kiev", "Europe/Kyiv", "Europe/Uzhgorod", "Europe/Zaporozhye" }); + testZone(localeProvider, CIUDAD_JUAREZ, + new String[] { "America/Cambridge_Bay", "America/Ciudad_Juarez" }); + } + + private static void testZoneStrings(final boolean debug) { System.out.println("Checking sanity of full zone string set..."); boolean invalid = Arrays.stream(Locale.getAvailableLocales()) - .peek(l -> System.out.println("Locale: " + l)) + .peek(l -> System.out.printf(debug ? "Locale: %s\n" : "", l)) .map(l -> DateFormatSymbols.getInstance(l).getZoneStrings()) + .peek(df -> System.out.printf(debug ? "Zone string size: %s\n" : "", df.length)) .flatMap(zs -> Arrays.stream(zs)) .flatMap(names -> Arrays.stream(names)) .filter(name -> Objects.isNull(name) || name.isEmpty()) @@ -78,12 +97,6 @@ public class TestTranslations { System.err.println("Zone string for a locale returned null or empty string"); System.exit(2); } - - String localeProvider = args[0]; - testZone(localeProvider, KYIV, - new String[] { "Europe/Kiev", "Europe/Kyiv", "Europe/Uzhgorod", "Europe/Zaporozhye" }); - testZone(localeProvider, CIUDAD_JUAREZ, - new String[] { "America/Cambridge_Bay", "America/Ciudad_Juarez" }); } private static void testZone(String localeProvider, Map exp, String[] ids) { diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index dc1a9f7..451e4a8 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -2589,6 +2589,7 @@ cjc.mainProgram(args) - Move version information and core NVR definitions back towards the top of the file - Specify portablerelease and rpmrelease (always 0 for portables) in the Release field - Obsolete old RHEL releases (9.7.0-z, 10.1-z) +- Make zone string debug output optional in TestTranslations - ** This tarball is embargoed until 2026-07-21 @ 1pm PT. ** - Resolves: RHEL-212332 - Resolves: RHEL-212334 @@ -2597,6 +2598,7 @@ cjc.mainProgram(args) - Resolves: RHEL-212341 - Resolves: RHEL-188866 - Resolves: RHEL-212345 +- Resolves: RHEL-212347 * Sat Jul 18 2026 Thomas Fitzsimmons - 1:21.0.11.0.10-1.3 - Disable abidiff inspection in rpminspect.yaml to avoid an out-of-memory error on the CentOS test farm