RFR: 8338690: CompactNumberInstance.format incorrectly formats some numbers (few vs many)
Justin Lu
jlu at openjdk.org
Fri Aug 23 19:19:03 UTC 2024
On Thu, 22 Aug 2024 16:14:08 GMT, Naoto Sato <naoto at openjdk.org> wrote:
> Fixing an issue wrt wrong plural suffix with compact format for some locales. It was retrieving the suffix based on the value before the rounding, which ended up in wrong plural expression.
Makes sense to defer the affix matching until the value is rounded. And moving the rounding logic before and using `decimalFormat.getDigitList().getDouble();` looks to be accurate in that regard. LGTM
-------------
Marked as reviewed by jlu (Committer).
PR Review: https://git.openjdk.org/jdk/pull/20680#pullrequestreview-2257951361
More information about the core-libs-dev
mailing list