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

javafx.lang.Duration.ge() returns wrong value. The same issue with le(), gt() and lt().

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      generic

      Description

      Found an issue in javafx.lang.Duration class.

      specification for method "public ge(other: Duration) : Boolean"
      says:

      (1) "Returns true if the *specified* duration is greater than or equal to (>=) *this*
      instance."

      But I wonder if this statement is correct, since it would be more clear and
      convenient to specify this method as:

      (2) "Returns true if *this* duration instance is greater than or equal to (>=) *other*
      (specified) instance."

      Would be more clear if o1.ge(o2) will return true if o1>=o2 but not vise versa.
      Moreover, current implementation behaves as described in (2).
      The same issue with methods le(), gt() and lt().

        Attachments

          Activity

            People

            Assignee:
            rbair Richard Bair (Inactive)
            Reporter:
            aposledo Alexander Posledov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: