fix NPE in memory properties

This commit is contained in:
Jörg Prante 2024-04-04 22:53:01 +02:00
parent 09b30ad7b6
commit 0ea35b8af5

View file

@ -76,7 +76,12 @@ public class MemoryPropertiesSessionCodec implements Codec<Session> {
private Properties toProperties(Map<String, Object> map) { private Properties toProperties(Map<String, Object> map) {
Properties properties = new Properties(); Properties properties = new Properties();
properties.putAll(map); map.forEach((k,v) -> {
// filter non-null keys and values for properties semantics
if (k != null && v != null) {
properties.put(k, v);
}
});
return properties; return properties;
} }