Skip to content

Commit

Permalink
adding of support for null value in attribute of ConnId EqualsFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Jun 24, 2020
1 parent 5e15b41 commit a209bd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -1819,7 +1819,7 @@ public void test171SearchShipSeaMonkey() throws Exception {
public void test172SearchShipNull() throws Exception {
testSeachIterativeSingleAttrFilter(
DummyResourceContoller.DUMMY_ACCOUNT_ATTRIBUTE_SHIP_NAME, null, null, true,
"daemon", "Will");
"daemon");
}

@Test
Expand Down
Expand Up @@ -16,6 +16,9 @@
import com.evolveum.midpoint.prism.PrismPropertyValue;

import com.evolveum.midpoint.prism.query.*;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;

import org.identityconnectors.framework.common.objects.Attribute;
import org.identityconnectors.framework.common.objects.AttributeBuilder;
import org.identityconnectors.framework.common.objects.OperationalAttributes;
Expand Down Expand Up @@ -58,8 +61,8 @@ public <T> Filter interpret(ObjectFilter objectFilter, ConnIdNameMapper icfNameM

Collection<Object> convertedValues = convertValues(propName, eq.getValues());
if (convertedValues == null || convertedValues.isEmpty()) {
// See MID-1460
throw new UnsupportedOperationException("Equals filter with a null value is NOT supported by ICF");
Attribute attr = AttributeBuilder.build(icfName);
return FilterBuilder.equalTo(attr);
} else {
Attribute attr = AttributeBuilder.build(icfName, convertedValues);
if (valueFilter.getDefinition().isSingleValue()) {
Expand Down

0 comments on commit a209bd0

Please sign in to comment.