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

The j.u.Formatter doc for TemporalAccessor should be enhanced

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • core-libs
    • None
    • minimal
    • This is a doc only change.
    • Java API
    • SE

      Summary

      Enhance the documentation of j.u.Formatter to overcome the problem described next.

      Problem

      The j.u.Formatter doc fails to mention that not all subtypes of TemporalAccessor carry timezone related information.

      The conversions %tz, %tZ, and %tc (and %Tz, %TZ, and %Tc) need timezone info. When applying them on a LocalDateTime, for example, a runtime exception is thrown.

      Solution

      An overview of the solution. Alternative solutions may be discussed; links to rationale documents or review threads welcome to provide additional background to reviewers.

      Specification

      The detailed changes. Acceptable normative formats include inline patches, attached webrevs, and attached specdiffs. The names of attached files are recommended to include a bug id. References to external webservers, such as http://cr.openjdk.java.net/, can be provided as informative supplements for the convenience of reviewers, but must be accompanied by a normative form of the specification directly associated with the CSR issue to satisfy archival purposes.

            rgiulietti Raffaello Giulietti
            rgiulietti Raffaello Giulietti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: