RFR: 8368172: Make java.time.format.DateTimePrintContext immutable [v3]
Shaojin Wen
swen at openjdk.org
Sat Sep 20 14:39:20 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 code style in DateTimeFormatterBuilder.format method
Co-authored-by: Qwen-Coder <qwen-coder at alibabacloud.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/26913/files
- new: https://git.openjdk.org/jdk/pull/26913/files/6f07a475..cac20038
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=26913&range=01-02
Stats: 1 line in 1 file changed: 0 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 core-libs-dev
mailing list