Async CryptBinding.retain() returns wrapped reference instead of this

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.0
    • Affects Version/s: None
    • Component/s: Reactive Streams
    • None
    • None
    • Fully Compatible
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Implementations of ReferenceCounted.retain should always return this. The implementation of com.mongodb.reactivestreams.client.internal.crypt.CryptBinding instead returns wrapped.retain().

      If a caller did something like:

      this.binding = binding.retain();
      

      this could lead to bad outcomes, like failure to encrypt or decrypt documents. While it doesn't appear that any driver code actually does this right now, we should still fix this to avoid future problems.

              Assignee:
              Jeffrey Yemin
              Reporter:
              Jeffrey Yemin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: