[JAVA-3635] GeoJSON Geometry constructors throw NPE Created: 27/Feb/20 Updated: 28/Oct/23 Resolved: 06/Apr/20 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Builders |
| Affects Version/s: | None |
| Fix Version/s: | 3.12.3, 4.0.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Oren Ovadia | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
When constructing geometries with immutable lists such as List.of(..), NPE's are thrown from !list.contains(null) checks performed by the constructors. This does not happen in the codecs because ArrayList permits `null` arguments and elements. Java's List API permits List implementations to either accept nulls or throw NPE. |
| Comments |
| Comment by Githook User [ 06/Apr/20 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: Use safe null-check for collection values
|
| Comment by Githook User [ 06/Apr/20 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: Use safe null-check for collection values
|
| Comment by Githook User [ 06/Apr/20 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com', 'username': 'jyemin'}Message: Use safe null-check for collection values
|