The spec change approved by the CSR JDK-8186697 had compatibility issues such as withXXX() methods would no longer be independent of the issuing order, e.g.,
formatter = formatter.withZone(zone).withLocale(locale);
formatter = formatter.withLocale(locale).withZone(zone);
would generate different formatter instances. To resolve this incompatibility, instead of augmenting the existing methods, introduce a new method that will replace the locale related fields in the formatter.
formatter = formatter.withZone(zone).withLocale(locale);
formatter = formatter.withLocale(locale).withZone(zone);
would generate different formatter instances. To resolve this incompatibility, instead of augmenting the existing methods, introduce a new method that will replace the locale related fields in the formatter.
- csr for
-
JDK-8191501 Add java.time.format.DateTimeFormatter localizedBy(locale) method to reflect Unicode extensions
- Closed
- relates to
-
JDK-8177568 JEP 314: Additional Unicode Language-Tag Extensions
- Closed
-
JDK-8186697 Unicode BCP 47 U Extension Enhancements
- Closed