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

Javadocs for java.time.Instant until(Temporal endExclusive, TemporalUnit unit) contains typo

    Details

    • Subcomponent:
    • Resolved In Build:
      b112
    • CPU:
      x86
    • OS:
      other

      Description

      A DESCRIPTION OF THE PROBLEM :
      The Javadocs for the java.time.Instant class currently contains the following sentence within the description of the until(Temporal endExclusive, TemporalUnit unit) method:
      "For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, SECONDS)."

      This is incorrect. It is stating that the example calculates the days between two Instants, but really it calculates the seconds between the two Instants.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "... For example, the amount in seconds between two dates can be calculated using startInstant.until(endInstant, SECONDS). ..."

      OR

      "... For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, DAYS). ..."
      ACTUAL -
      "... For example, the amount in days between two dates can be calculated using startInstant.until(endInstant, SECONDS). ..."


      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#until-java.time.temporal.Temporal-java.time.temporal.TemporalUnit-

        Activity

        Show
        aroy Abhijit Roy (Inactive) added a comment - JDK 8 : Issue found https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#until-java.time.temporal.Temporal-java.time.temporal.TemporalUnit- JDK 9ea : Issue found http://download.java.net/java/jdk9/docs/api/java/time/Instant.html#until-java.time.temporal.Temporal-java.time.temporal.TemporalUnit-
        Show
        aroy Abhijit Roy (Inactive) added a comment - - edited http://cr.openjdk.java.net/~ntv/abhijit/webrev.00/
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/403329bd6983
        User: rriggs
        Date: 2016-03-23 15:12:25 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/403329bd6983 User: rriggs Date: 2016-03-23 15:12:25 +0000
        Hide
        hgupdate HG Updates added a comment -
        URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/403329bd6983
        User: lana
        Date: 2016-03-30 18:38:15 +0000
        Show
        hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/403329bd6983 User: lana Date: 2016-03-30 18:38:15 +0000

          People

          • Assignee:
            aroy Abhijit Roy (Inactive)
            Reporter:
            webbuggrp Webbug Group
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: