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

Make ScanTerm immutable

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • None
    • 1

    Description

      Suggested Release Note: NONE

      Previously, a ScanTerm could be modified by setting elements of the array returned by `id()`. The MINIMUM_PATTERN and MINIMUM_PATTERN "constants" could be mutated in this way too, either by directly modifying the public static array or by modifying the array returned by `ScanResult.minimum().id()`.

      To make ScanTerm fully immutable, the constructor should make a defensive copy of the "id" byte array, and the id() method should also return a copy of the array.

      Attachments

        For Gerrit Dashboard: JCBC-2013
        # Subject Branch Project Status CR V

        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:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty