Commit 3fa94cca authored by michael.simon's avatar michael.simon
Browse files

Check for null on filter maps

parent 6ea5a508
......@@ -192,11 +192,13 @@ public abstract class JpaBaseDao<T extends BaseEntity<PK>, PK extends Serializab
protected List<Predicate> predicatesFromFilterMap(CriteriaBuilder builder, Root<T> root, Map<String, Object> filterMap) {
List<Predicate> predicates = new ArrayList<Predicate>(filterMap.size());
List<Predicate> predicates = new ArrayList<Predicate>();
if (filterMap != null) {
for (Entry<String, Object> entry : filterMap.entrySet()) {
predicates.add(predicateFromObject(builder, root, entry.getKey(), entry.getValue()));
}
}
return predicates;
......@@ -206,11 +208,13 @@ public abstract class JpaBaseDao<T extends BaseEntity<PK>, PK extends Serializab
List<Predicate> predicates = new ArrayList<Predicate>();
if (additionalFilterMap != null) {
for (Entry<String, FilterMeta> entry : additionalFilterMap.entrySet()) {
if (entry.getValue() != null && entry.getValue().getFilterValue() != null) {
predicates.add(predicateFromFilterMeta(builder, root, entry.getKey(), entry.getValue()));
}
}
}
return predicates;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment