| JDK 21 |
|---|
| 21 b26Fixed |
|
Blocks :
|
Observed that SequencedMap:firstEntry() throws NullPointerEx when the map entry has null key or null value.
Example : the following code snippet throws NPEx.
======== ( When key is null )
SequencedMap<String, String> sequencedMap = new LinkedHashMap<>();
sequencedMap.put(null, "v1");
sequencedMap.firstEntry();
======== (When value is null )
SequencedMap<String, String> sequencedMap = new LinkedHashMap<>();
sequencedMap.put("k", null);
sequencedMap.firstEntry();
=====
|