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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • fx2.0
    • fx2.0
    • javafx
    • generic

      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().

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

              Created:
              Updated:
              Resolved:
              Imported: