From c63ca2ce5473496e8c2deb33585f7c49e946bf6c Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Mon, 14 Aug 2023 18:24:15 -0400 Subject: [PATCH] Hack to try to see if we can get GH builds to pass on Java 17 --- .../lang3/time/FastDateParser_TimeZoneStrategyTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java b/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java index e0352df53..7c031a0a1 100644 --- a/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java +++ b/src/test/java/org/apache/commons/lang3/time/FastDateParser_TimeZoneStrategyTest.java @@ -70,7 +70,7 @@ public class FastDateParser_TimeZoneStrategyTest extends AbstractLangTest { } public static Locale[] getAvailableLocalesSorted() { - return ArraySorter.sort(Locale.getAvailableLocales(), Comparator.comparing(Locale::getDisplayName)); + return ArraySorter.sort(Locale.getAvailableLocales(), Comparator.comparing(Locale::toString)); } @Test @@ -126,13 +126,12 @@ public class FastDateParser_TimeZoneStrategyTest extends AbstractLangTest { if (SystemUtils.IS_JAVA_17 && Arrays.binarySearch(FAILS_ON_GH_JAVA_17, localeStr) > 0) { Java17Failures.add(locale); // Mark as an assumption failure instead of a hard fail - System.err.println("Java 17 - Mark as an assumption failure instead of a hard fail: " + localeStr); + System.err.printf("Java 17 - Mark as an assumption failure instead of a hard fail: locale = '%s'%n", localeStr); assumeTrue(false, localeStr); continue; } - final String msg = String.format("%s: with locale = %s, zIndex = %,d, tzDisplay = '%s', parser = '%s'", e, locale, zIndex, tzDisplay, - parser.toString()); - fail(msg, e); + fail(String.format("%s: with locale = %s, zIndex = %,d, tzDisplay = '%s', parser = '%s'", e, localeStr, zIndex, tzDisplay, + parser.toString()), e); } } }