This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push: new 8f686ad270 Update for a change in localization data in Java 20: `Locale.CANADA` become more like US. We fix the tests by using `Locale.CANADA_FRENCH`, which keep the "year/month/day" format. 8f686ad270 is described below commit 8f686ad270ec4ff78bda6b7f03d11358d8abdcef Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Sat Apr 22 12:03:42 2023 +0200 Update for a change in localization data in Java 20: `Locale.CANADA` become more like US. We fix the tests by using `Locale.CANADA_FRENCH`, which keep the "year/month/day" format. --- .../src/test/java/org/apache/sis/measure/RangeFormatTest.java | 4 ++-- core/sis-utility/src/test/java/org/apache/sis/measure/RangeTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java b/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java index 8d176f62e3..e9151c95e5 100644 --- a/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java +++ b/core/sis-utility/src/test/java/org/apache/sis/measure/RangeFormatTest.java @@ -42,7 +42,7 @@ import static org.apache.sis.internal.util.StandardDateFormat.UTC; * Tests parsing and formatting done by the {@link RangeFormat} class. * * @author Martin Desruisseaux (Geomatys) - * @version 1.1 + * @version 1.4 * @since 0.3 */ @DependsOn(MeasurementRangeTest.class) @@ -308,7 +308,7 @@ public final class RangeFormatTest extends TestCase { */ @Test public void testFormatLocalDate() { - format = new RangeFormat(Locale.CANADA, LocalDate.class); + format = new RangeFormat(Locale.CANADA_FRENCH, LocalDate.class); final Range<LocalDate> range = new Range<>(LocalDate.class, LocalDate.parse("2019-12-23"), true, LocalDate.parse("2020-05-31"), true); diff --git a/core/sis-utility/src/test/java/org/apache/sis/measure/RangeTest.java b/core/sis-utility/src/test/java/org/apache/sis/measure/RangeTest.java index d266990144..ea65820987 100644 --- a/core/sis-utility/src/test/java/org/apache/sis/measure/RangeTest.java +++ b/core/sis-utility/src/test/java/org/apache/sis/measure/RangeTest.java @@ -352,7 +352,7 @@ public final class RangeTest extends TestCase { * The result depends on time zone and we have no API for forcing the time zone to some specific * value in a call to 'Range.formatTo(Formatter, …)`. So we verify only the year and the month. */ - final String result = String.format(Locale.CANADA, "%s", range); + final String result = String.format(Locale.CANADA_FRENCH, "%s", range); assertTrue(result, result.matches("\\[2019-12-.+ … 2020-05-.+\\]")); }