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

Observables should filter null values

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.11.1
    • Affects Version/s: None
    • Component/s: Async
    • None

      Unfortunately, throwing a NPE when seeing a null value in the AbstractSubscription class had some unintended consequences.

      Any async method that returns Void (eg Start transaction, abort transaction etc..) and find()#first() all would throw a NPE. A hotfix had to be implemented in SCALA-555 and JAVARS-209 to work around the limitation but there may be edge cases where NPE's can still be raised.

      Given that we are in control of providing the data to consumers, throwing a NPE is unhelpful and prevents the normal flow of Observables.

            Assignee:
            john.stewart@mongodb.com John Stewart (Inactive)
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: