[JAVA-3515] Work around Collectors.toMap NPE bug Created: 22/Nov/19  Updated: 28/Oct/23  Resolved: 26/Nov/19

Status: Closed
Project: Java Driver
Component/s: Reactive Streams
Affects Version/s: None
Fix Version/s: 4.0.0

Type: Bug Priority: Major - P3
Reporter: Ross Lawley Assignee: Ross Lawley
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The recent JAVA-1788 support for returning results from insertions uses Collectors.toMap which contains a bug in the openJDK when collecting null values.

The perf tests highlight this bug as any bulk inserts of RawBsonDocuments will trigger it on openJDK 8 & 11.



 Comments   
Comment by Githook User [ 15/Jan/20 ]

Author:

{'name': 'Ross Lawley', 'username': 'rozza', 'email': 'ross.lawley@gmail.com'}

Message: Fix Collectors.toMap NPE bug

Also only filter unprocessed items when calculating inserted results

JAVA-3515
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/98519f1b0bdda7600b3e59c8d3c3381dfec95a38

Comment by Ross Lawley [ 22/Nov/19 ]

PR: https://github.com/rozza/mongo-java-driver/pull/338

Generated at Thu Feb 08 08:59:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.