Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8368172

Make java.time.format.DateTimePrintContext immutable

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • None
    • core-libs
    • None

      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.

            swen Shaojin Wen
            swen Shaojin Wen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: