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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.0
    • None
    • Reactive Streams
    • None
    • Fully Compatible
    • Not Needed

    Description

      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.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: