On Sat, 23 Aug 2025 11:27:55 GMT, Shaojin Wen <[email protected]> wrote:

> 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.

This pull request has now been integrated.

Changeset: a588c120
Author:    Shaojin Wen <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/a588c120fc2ec9d5c59c43cda7f247e0a84981ff
Stats:     88 lines in 3 files changed: 9 ins; 32 del; 47 mod

8368172: Make java.time.format.DateTimePrintContext immutable

Reviewed-by: liach

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

PR: https://git.openjdk.org/jdk/pull/26913

Reply via email to