Wrong first day of the week with Java 9+ with "language-only" Locales

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Wrong first day of the week with Java 9+ with "language-only" Locales

Ben Weidig
Hi,

thanks to Java 9+ using the Common Locale Data Repository (CLDR) by default

https://www.oracle.com/java/technologies/javase/v9-issues-relnotes.html#JDK-8008577

the org.apache.tapestry5.internal.services.messages.ClientLocalizationMessageResource
will have a different first day of the week, if not a "full" Locale is used.

We use "language-only" Locales (e.g., de, en, fr, it), but the CLDR uses
the region to determine the first day of the week. I'm not sure *if* it
should be fixed, because it makes more sense to actually.

But it's kind of a breaking change, if we don't switch to full locales,
which will bring other problems with correct locale resolution.

It can be "fixed" by setting the locale provider lookup order of the
JDK: -Djava.locale.providers=COMPAT,CLDR

Maybe there should be a way to configure region fallbacks for Locales
without languages?

Best regards,
Ben