mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-30 18:27:56 +08:00
Fix findbugs warnings #PL-6147
This commit is contained in:
parent
d274d5d395
commit
b104527b7f
@ -70,8 +70,9 @@ public class EntityPermissionTargetsDatasource extends CollectionDatasourceImpl<
|
||||
data.clear();
|
||||
|
||||
for (OperationPermissionTarget target : targets) {
|
||||
if ((filter == null) || (permissionsFilter.apply(target)))
|
||||
if ((permissionsFilter == null) || (permissionsFilter.apply(target))) {
|
||||
data.put(target.getId(), target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class MultiplePermissionTargetsDatasource extends CollectionDatasourceImp
|
||||
|
||||
private List<MultiplePermissionTarget> targets;
|
||||
|
||||
private Predicate<MultiplePermissionTarget> filter;
|
||||
private Predicate<MultiplePermissionTarget> permissionsFilter;
|
||||
|
||||
private CollectionDatasource<Permission, UUID> permissionDs;
|
||||
|
||||
@ -63,8 +63,9 @@ public class MultiplePermissionTargetsDatasource extends CollectionDatasourceImp
|
||||
clear();
|
||||
|
||||
for (MultiplePermissionTarget target : targets) {
|
||||
if ((filter == null) || (filter.apply(target)))
|
||||
if ((permissionsFilter == null) || (permissionsFilter.apply(target))) {
|
||||
data.put(target.getId(), target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,11 +97,11 @@ public class MultiplePermissionTargetsDatasource extends CollectionDatasourceImp
|
||||
}
|
||||
|
||||
public Predicate<MultiplePermissionTarget> getFilter() {
|
||||
return filter;
|
||||
return permissionsFilter;
|
||||
}
|
||||
|
||||
public void setFilter(Predicate<MultiplePermissionTarget> filter) {
|
||||
this.filter = filter;
|
||||
this.permissionsFilter = filter;
|
||||
}
|
||||
|
||||
public CollectionDatasource<Permission, UUID> getPermissionDs() {
|
||||
|
Loading…
Reference in New Issue
Block a user