spring-projects / spring-boot

Spring Boot
https://spring.io/projects/spring-boot
Apache License 2.0
74.94k stars 40.64k forks source link

Updating Map with null value is raising NullPointerException because Collectors.toMap is checking map null value #38673

Closed nlenew closed 10 months ago

nlenew commented 10 months ago

Hi,

We have got that issue migrating from Spring Boot 3.1.5 (using spring-data-mongodb 4.1.6) to Spring Boot 3.2.0 (using spring-data-mongodb 4.2.0) We have a Map we would like to save and sometimes with null values. The problem deals with those null values. If we have a closer look at the code, we can see it is using stream collectors which requires a non-null value. diff_sdm416_sdm420

Can you have a look at this ?

Thank you for your time.

wilkinsona commented 10 months ago

Spring Data MongoDB is managed as a separate project.

nlenew commented 10 months ago

Ok, thanks, will log there.