<i18n dev> RFR: 8176706: Additional Date-Time Formats [v4]
Naoto Sato
naoto at openjdk.java.net
Fri Feb 11 23:55:49 UTC 2022
On Fri, 11 Feb 2022 22:26:03 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Addressing review comments
>
> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 5103:
>
>> 5101: * @param timeStyle the time style to use, may be null
>> 5102: */
>> 5103: LocalizedPrinterParser(FormatStyle dateStyle, FormatStyle timeStyle) {
>
> Can the constructors be `private`.
> The combination of package protected and the style of caller doing the validation makes me a bit nervous.
> There should not be any callers outside of DateTimeFormatterBuilder.
Changed to `private` so that it can only be instantiated within `DateTimeFormatterBuilder`. Same modifications are applied to other `DateTimePrinterParser` implementations.
> src/java.base/share/classes/sun/text/spi/JavaTimeDateTimePatternProvider.java line 79:
>
>> 77: public String getJavaTimeDateTimePattern(String requestedTemplate, String calType, Locale locale) {
>> 78: // default implementation throws exception
>> 79: throw new DateTimeException("Formatter is not available for the requested template: " + requestedTemplate);
>
> "Formatting **pattern** is not available"...
Modified, as well as other minor corrections in the javadoc.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7340
More information about the i18n-dev
mailing list