Uploaded image for project: 'Kotlin Couchbase Client'
  1. Kotlin Couchbase Client
  2. KCBC-46

Use kotlin.time.Duration instead of java.time.Duration

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 1.0.0-dp.5
    • None
    • None
    • None
    • 1

    Description

      In Kotlin 1.6 kotlin.time.Duration is no longer marked as Experimental, so we can go ahead and use Kotlin's Duration in the SDK API.

      This is nice because instead of `Duration.ofSeconds(30)` you can write `30.seconds`.

      Breaking Changes:

      Yeah, this breaks everything that used java.time.Duration.
      Also, the following methods have been deprecated:

      • Expiry.ofSeconds
      • Expiry.ofMinutes
      • Expiry.ofHours
      • Expiry.ofDays

      Instead, use `Expiry.of(x.seconds)` (or minutes, hours, days)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            david.nault David Nault
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty