From 49bc73d00088f36b31e298e23b8f37e3f540bfba Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Sun, 21 Sep 2025 23:41:02 +0100 Subject: [PATCH] Adapt TestTranslations test to OpenJDK 22 - Adjust CLDR expectations in TestTranslations.java after JDK-8317979 started using tzdata values - Adjust TestTranslations.java to expect the same short name throughout for fr_FR and de_DE (bug?) Related: RHEL-100678 --- TestTranslations.java | 14 +++++--------- java-25-openjdk.spec | 2 ++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/TestTranslations.java b/TestTranslations.java index f6a4fe2..0b3f74b 100644 --- a/TestTranslations.java +++ b/TestTranslations.java @@ -50,11 +50,11 @@ public class TestTranslations { "Mountain Daylight Time", "MDT", "MDT", "Mountain Time", "MT", "MT"}); map.put(Locale.FRANCE, new String[] { "heure normale des Rocheuses", "UTC\u221207:00", "MST", - "heure d\u2019\u00e9t\u00e9 des Rocheuses", "UTC\u221206:00", "MDT", - "heure des Rocheuses", "UTC\u221207:00", "MT"}); + "heure d\u2019\u00e9t\u00e9 des Rocheuses", "UTC\u221206:00", "MST", + "heure des Rocheuses", "UTC\u221207:00", "MST"}); map.put(Locale.GERMANY, new String[] { "Rocky-Mountain-Normalzeit", "GMT-07:00", "MST", - "Rocky-Mountain-Sommerzeit", "GMT-06:00", "MDT", - "Rocky-Mountain-Zeit", "GMT-07:00", "MT"}); + "Rocky-Mountain-Sommerzeit", "GMT-06:00", "MST", + "Rocky-Mountain-Zeit", "GMT-07:00", "MST"}); CIUDAD_JUAREZ = Collections.unmodifiableMap(map); } @@ -97,14 +97,10 @@ public class TestTranslations { System.out.printf("Checking locale %s for %s...\n", l, id); - if ("JRE".equals(localeProvider)) { + if ("JRE".equals(localeProvider) || "CLDR".equals(localeProvider)) { expectedShortStd = expected[2]; expectedShortDST = expected[5]; expectedShortGen = expected[8]; - } else if ("CLDR".equals(localeProvider)) { - expectedShortStd = expected[1]; - expectedShortDST = expected[4]; - expectedShortGen = expected[7]; } else { System.err.printf("Invalid locale provider %s\n", localeProvider); System.exit(3); diff --git a/java-25-openjdk.spec b/java-25-openjdk.spec index 71d04e0..ad137ce 100644 --- a/java-25-openjdk.spec +++ b/java-25-openjdk.spec @@ -2478,6 +2478,8 @@ exit 0 - Update to jdk-22.0.2+9 (GA) - Update release notes with features of JDK 22 - Remove 21u FIPS patch and disable use until we are ready for the 25 version +- Adjust CLDR expectations in TestTranslations.java after JDK-8317979 started using tzdata values +- Adjust TestTranslations.java to expect the same short name throughout for fr_FR and de_DE (bug?) - Related: RHEL-100678 * Mon Aug 25 2025 Andrew Hughes - 1:21.0.8.0.9-1