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

java.time.chrono.HijrahChronology.eraOf() assertions may lead to misunderstanding

    Details

    • Subcomponent:
    • Resolved In Build:
      b67

      Backports

        Description

        The spec for the java.time.chrono.HijrahChronology.eraOf() asserts:

        "Later eras must have sequentially higher values. Earlier eras must have sequentially lower values."

        https://docs.oracle.com/javase/8/docs/api/java/time/chrono/HijrahChronology.html#eraOf-int-

        whereas

        "The Hijrah calendar system has only one era covering the proleptic years greater than zero."

        that may lead to misunderstanding.

        https://docs.oracle.com/javase/8/docs/api/java/time/chrono/HijrahEra.html

          Activity

          Hide
          scolebourne Stephen Colebourne added a comment -
          The former applies to all chronologies, thanks to its location on Chronology. There is often benefit in a more specific spec on a subclass as in this case.
          Show
          scolebourne Stephen Colebourne added a comment - The former applies to all chronologies, thanks to its location on Chronology. There is often benefit in a more specific spec on a subclass as in this case.
          Hide
          chegar Chris Hegarty added a comment -
          Assigning to Roger, for now, but this may be closed as 'not a bug'.
          Show
          chegar Chris Hegarty added a comment - Assigning to Roger, for now, but this may be closed as 'not a bug'.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/83e0f851c7b8
          User: rriggs
          Date: 2015-05-28 21:38:25 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/83e0f851c7b8 User: rriggs Date: 2015-05-28 21:38:25 +0000
          Hide
          rriggs Roger Riggs added a comment -
          The javadoc for HijrahChronology.ofEra currently inherits the javadoc of Chronology.ofEra.
          The javadoc can be made more specific to HijrahChronology.ofEra without affecting the behavior.
          Only a single Era exists the Hijrah chronology as specified in HijrahEra.
          The 'conformance' label should be reexamined and possibly removed.
          Show
          rriggs Roger Riggs added a comment - The javadoc for HijrahChronology.ofEra currently inherits the javadoc of Chronology.ofEra. The javadoc can be made more specific to HijrahChronology.ofEra without affecting the behavior. Only a single Era exists the Hijrah chronology as specified in HijrahEra. The 'conformance' label should be reexamined and possibly removed.
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/83e0f851c7b8
          User: lana
          Date: 2015-06-03 20:22:43 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/83e0f851c7b8 User: lana Date: 2015-06-03 20:22:43 +0000

            People

            • Assignee:
              rriggs Roger Riggs
              Reporter:
              ostrizhe Olga Strizhenko (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: