[JAVA-3382] Observables should filter null values Created: 14/Aug/19 Updated: 28/Oct/23 Resolved: 23/Aug/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Async |
| Affects Version/s: | None |
| Fix Version/s: | 3.11.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ross Lawley | Assignee: | John Stewart (Inactive) |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 10/Oct/19 ] |
|
Author: {'name': 'John Stewart', 'username': 'jstewart-mongo', 'email': 'john.stewart@mongodb.com'}Message: Filter null values for Observables
|
| Comment by Githook User [ 23/Aug/19 ] |
|
Author: {'name': 'John Stewart', 'email': 'john.stewart@mongodb.com', 'username': 'jstewart-mongo'}Message: Filter null values for Observables
|