-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
16
A DESCRIPTION OF THE PROBLEM :
When creating collecctions with the static factoy methods List.of(), Set.of() and Map.of(), the resulting collections will throw NullPointerExceptions when a query method is invoked with a null parameter. For example contains(null), indexOf(null), containsKey(null), containsAll(Arrays.asList(null))
This behavior is extremely unobvious and should be documented.
See also:
https://bugs.openjdk.java.net/browse/JDK-8265905
https://github.com/jdbi/jdbi/issues/1263
https://www.reddit.com/r/java/comments/ni42ot/listof_is_terrible/
When creating collecctions with the static factoy methods List.of(), Set.of() and Map.of(), the resulting collections will throw NullPointerExceptions when a query method is invoked with a null parameter. For example contains(null), indexOf(null), containsKey(null), containsAll(Arrays.asList(null))
This behavior is extremely unobvious and should be documented.
See also:
https://bugs.openjdk.java.net/browse/JDK-8265905
https://github.com/jdbi/jdbi/issues/1263
https://www.reddit.com/r/java/comments/ni42ot/listof_is_terrible/