simple-ui: fix NPE on filters (#2635)

* simple-ui: fix NPE on filters

* simple-ui: fix NPE on filters
This commit is contained in:
Mohamed Zenadi
2025-09-09 14:03:05 +02:00
committed by GitHub
parent dd5f12d8c5
commit f2e6344775

View File

@@ -116,13 +116,7 @@ public class Filter extends Div {
final Map<Object, Object> normalized = new HashMap<>(keyToValues)
.entrySet()
.stream()
.map(e -> {
if (e.getValue() instanceof Optional<?> opt) {
e.setValue(opt.orElse(null));
}
return e;
})
.filter(e -> !ObjectUtils.isEmpty(e))
.filter(e -> !ObjectUtils.isEmpty(e.getValue()))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
if (normalized.isEmpty()) {
return null;