Skip to content

Commit

Permalink
UuidItemFilterProcessor: used new filter.hasNoValue() method
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Jun 10, 2022
1 parent 7901113 commit d0512af
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2021 Evolveum and contributors
* Copyright (C) 2010-2022 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
Expand Down Expand Up @@ -49,14 +49,15 @@ public Predicate process(PropertyValueFilter<Object> filter) throws RepositoryEx
// This is adapted version of ItemValueFilterProcessor#createBinaryCondition.
// Because conversion is different for various operations, we don't use ValueFilterValues.
FilterOperation operation = operation(filter);
if (filter.getValues() == null || filter.getValues().isEmpty()) {
if (filter.hasNoValue()) {
if (operation.isAnyEqualOperation()) {
return ExpressionUtils.predicate(Ops.IS_NULL, path);
} else {
throw new QueryException("Null value for other than EQUAL filter: " + filter);
}
}

//noinspection ConstantConditions
if (filter.getValues().size() > 1) {
if (operation.isAnyEqualOperation()) {
List<UUID> oids = filter.getValues().stream()
Expand Down

0 comments on commit d0512af

Please sign in to comment.