On Fri, 23 Oct 2026 20:37:19 GMT, Justin Lu <[email protected]> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Copyright year update
>
> src/java.base/share/classes/java/text/SimpleDateFormat.java line 2228:
>
>> 2226: && (text.length() - start) >
>> gmtZero.length()
>> 2227: && text.regionMatches(true, start,
>> gmtZero, 0, gmtZero.length())
>> 2228: && (text.charAt(start +
>> gmtZero.length()) == '+' || text.charAt(start + gmtZero.length()) == '-')) {
>
> If this text is localized won't the '+' and '-' be localized as well? I guess
> that is a limitation, since the existing code below does not handle that as
> well. Also, is it not possible that the sign would precede the localized gmt
> text?
Yes, this is a limitation for now for SDF. Added a comment mentioning it
> src/java.base/share/classes/sun/util/locale/provider/TimeZoneNameUtility.java
> line 207:
>
>> 205: var rb =
>> ca.getLocaleResources(locale).getJavaTimeFormatData();
>> 206: if (rb.containsKey("timezone.gmtZeroFormat")) {
>> 207: return rb.getString("timezone.gmtZeroFormat");
>
> If `gmtZeroFormat` no longer exists in v49 is there a reason to bother
> querying it? If not, can we remove it, if so, can we make that clear (since
> the method doc says it is removed).
Since the DTD still defines `gmtZeroFormat` I left it for compatibility. Added
a comment explaining it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33522#discussion_r4381060724
PR Review Comment: https://git.openjdk.org/jdk/pull/33522#discussion_r4381061115