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
This commit is contained in:
Andrew Hughes 2025-09-21 23:41:02 +01:00
parent 82db2fdb6f
commit 49bc73d000
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

@ -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 <gnu.andrew@redhat.com> - 1:21.0.8.0.9-1