<i18n dev> RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v6]
Shaojin Wen
swen at openjdk.org
Thu Oct 2 03:08:32 UTC 2025
> I propose to make j.t.f.DateTimePrintContext immutable.
>
> Currently, DateTimePrintContext has only one mutable field, optional. This can be replaced by adding an optional parameter to the DateTimeFormatter.formatTo method.
>
> Immutable DateTimePrintContext can be optimized by escape analysis, such as immutable object optimization.
Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision:
Improve javadoc for optional parameter in DateTimePrinterParser#format method
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26913/files
- new: https://git.openjdk.org/jdk/pull/26913/files/5a7e2316..6b35ea29
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=04-05
Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/26913.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26913/head:pull/26913
PR: https://git.openjdk.org/jdk/pull/26913
More information about the i18n-dev
mailing list