Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3974

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

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

      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:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: