Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1787

Validate expiry instants

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 3.2.0
    • None
    • None
    • 1

    Description

      Throw if user specifies an Instant that would overflow the unsigned 32-bit expiry value in the wire protocol, or would be interpreted as a relative duration.

      Throw if a user specifies a Duration longer than 50 years.

      Attachments

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

        Activity

          david.nault David Nault added a comment - - edited

          Suggested release note text:

          The SDK now validates document expiry arguments, and rejects extreme values that would otherwise result in the document expiring earlier or later than requested. Specifically, an InvalidArgumentException is now thrown if the expiry meets any of these criteria:

               - after 2106-02-07T06:28:15Z

               - specified as a non-zero Instant before 1970-02-01T00:00:00Z

               - specified as a non-zero Duration less than 1 second or greater than 18,250 days (~50 years)

           

          david.nault David Nault added a comment - - edited Suggested release note text: The SDK now validates document expiry arguments, and rejects extreme values that would otherwise result in the document expiring earlier or later than requested. Specifically, an InvalidArgumentException is now thrown if the expiry meets any of these criteria:      - after 2106-02-07T06:28:15Z      - specified as a non-zero Instant before 1970-02-01T00:00:00Z      - specified as a non-zero Duration less than 1 second or greater than 18,250 days (~50 years)  

          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