RFR: 8366224: Introduce DecimalDigits.appendPair for efficient two-digit formatting and refactor DateTimeHelper [v4]

Shaojin Wen swen at openjdk.org
Fri Sep 19 00:40:17 UTC 2025


On Mon, 15 Sep 2025 03:15:55 GMT, Chen Liang <liach at openjdk.org> wrote:

> This solution, if it is to be accepted, can only be a stopgap measure - I think the most likely feature to replace this hack would be String Templates. What abilities do you think that String Templates should support so that you can cover this use case (when we migrate the DateTimeFormatter to be String template instead of StringBuilder based)?

j.t.f.DateTimeFormatterBuilder$CompositePrinterParser supports nesting and Optional, StringTempldate does not support these capabilities.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26911#issuecomment-3310102118


More information about the core-libs-dev mailing list