java.time.Duration missing isPositive method

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 18
    • Affects Version/s: 9
    • Component/s: core-libs
    • None
    • b08

      The omission of java.time.Duration.isPositive() seems odd.
      It would be useful compared to alternatives using existing methods.

      !isZero() && !isNegative()
      !.negate().isNegative()
      .compareTo(Duration.ZERO) > 0

      See http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-December/045552.html

            Assignee:
            Naoto Sato
            Reporter:
            Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: