-
Bug
-
Resolution: Fixed
-
P3
-
11.0.3
-
b08
-
generic
-
windows
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8230955 | 13.0.2 | Naoto Sato | P3 | Resolved | Fixed | b01 |
JDK-8230001 | 11.0.6-oracle | Robert Mckenna | P3 | Resolved | Fixed | b01 |
JDK-8234557 | 11.0.6 | Naoto Sato | P3 | Resolved | Fixed | b05 |
On JDK 11 when using the host locale provider with GregorianCalendar,
the display name of era got from Calendar.getDIsplayNames() is "A.D." on Windows,
which should "AD". Meanwhile, the correct display name can be obtained when
getting it from Calendar.getDisplayName(). The issue is reproducible with
the JDK 14 and a backport is needed to JDK 11.
$ ${JDK11}/java -showversion -Djava.locale.providers=HOST Sample3
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
SHORT_FORMAT ERA by getDisplayName:AD
SHORT_FORMAT ERA by getDisplayNames:{BC=0, A.D.=1}
$ ${JDK11}/java -showversion Sample3
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
SHORT_FORMAT ERA by getDisplayName:AD
SHORT_FORMAT ERA by getDisplayNames:{BC=0, AD=1}
the display name of era got from Calendar.getDIsplayNames() is "A.D." on Windows,
which should "AD". Meanwhile, the correct display name can be obtained when
getting it from Calendar.getDisplayName(). The issue is reproducible with
the JDK 14 and a backport is needed to JDK 11.
$ ${JDK11}/java -showversion -Djava.locale.providers=HOST Sample3
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
SHORT_FORMAT ERA by getDisplayName:AD
SHORT_FORMAT ERA by getDisplayNames:{BC=0, A.D.=1}
$ ${JDK11}/java -showversion Sample3
java version "11.0.2" 2019-01-15 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
SHORT_FORMAT ERA by getDisplayName:AD
SHORT_FORMAT ERA by getDisplayNames:{BC=0, AD=1}
- backported by
-
JDK-8230001 HOST locale provider holds wrong era name for GregorianCalendar in US locale
-
- Resolved
-
-
JDK-8230955 HOST locale provider holds wrong era name for GregorianCalendar in US locale
-
- Resolved
-
-
JDK-8234557 HOST locale provider holds wrong era name for GregorianCalendar in US locale
-
- Resolved
-
- relates to
-
JDK-8039301 [ja] Host Locale Provider uses non-translated Calendar field names
-
- Resolved
-