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

Enhance ChronoField Javadoc

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • None
    • b114

      `ChronoField` has four fields for hours - HOUR_OF_DAY, HOUR_OF_AMPM, CLOCK_HOUR_OF_DAY and CLOCK_HOUR_OF_AMPM. The Javadoc for HOUR_OF_DAY should be enhanced to refer to CLOCK_HOUR_OF_DAY and vice versa. The same should be done for HOUR_OF_AMPM and CLOCK_HOUR_OF_AMPM.

      This change will help users find their way between each pair of fields.

      The documentation added to HOUR_OF_DAY will be something like

      "<p>
      See {@link #CLOCK_HOUR_OF_DAY} for the related field that counts hours from 1 to 24.
      "

      It would seem wise to also update the documentation of AMPM_OF_DAY to refer to CLOCK_HOUR_OF_AMPM to ensure users can connect their options.

      This change does not affect the meaning or intent of the spec, it just adds clarification.

      There is also a bug in CLOCK_HOUR_OF_DAY where it refers to "AM/PM" instead of "day".

            ntv Nadeesh Tv
            scolebourne Stephen Colebourne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: