mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-10368 NPE in FilterDelegateImpl.getDefaultFilter is possible
This commit is contained in:
parent
98a33f36fd
commit
aaaf395498
@ -1076,7 +1076,7 @@ public class FilterDelegateImpl implements FilterDelegate {
|
||||
}
|
||||
|
||||
FilterEntity globalDefaultFilter = filters.stream()
|
||||
.filter(FilterEntity::getGlobalDefault)
|
||||
.filter(filterEntity -> Boolean.TRUE.equals(filterEntity.getGlobalDefault()))
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
return globalDefaultFilter;
|
||||
|
@ -330,7 +330,7 @@ public class FilterEditor extends AbstractWindow {
|
||||
filterEntity.setIsDefault(defaultCb.getValue());
|
||||
filterEntity.setApplyDefault(applyDefaultCb.getValue());
|
||||
|
||||
boolean globalDefaultShouldBeChecked = !filterEntity.getGlobalDefault() && globalDefaultCb.getValue();
|
||||
boolean globalDefaultShouldBeChecked = !Boolean.TRUE.equals(filterEntity.getGlobalDefault()) && globalDefaultCb.getValue();
|
||||
filterEntity.setGlobalDefault(globalDefaultCb.getValue());
|
||||
|
||||
if (globalDefaultShouldBeChecked) {
|
||||
|
Loading…
Reference in New Issue
Block a user