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-126022
This commit is contained in:
Andrew Hughes 2025-09-21 23:41:02 +01:00
parent 06e51cd5ab
commit 098cee93f4
2 changed files with 7 additions and 9 deletions

View File

@ -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);

View File

@ -2482,5 +2482,7 @@ exit 0
- Update README file for java-25-openjdk
- Make sure this is not the default/system JDK providing 'java', 'jre', 'java-devel' ,etc.
- 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?)
- Sync the copy of the portable specfile with the latest update
- Related: RHEL-126022