Skip to content

Commit

Permalink
MID-7690: Fixed condition in TransformableContainerDefinitinon
Browse files Browse the repository at this point in the history
  • Loading branch information
tonydamage committed Mar 16, 2022
1 parent 140da3d commit 941bdf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
package com.evolveum.midpoint.model.impl.schema.transform;

import java.util.*;
import java.util.function.Consumer;

import javax.xml.namespace.QName;

import com.evolveum.midpoint.prism.*;
Expand Down Expand Up @@ -72,8 +70,11 @@ public Class getTypeClass() {
@Override
public <T extends ItemDefinition<?>> T findItemDefinition(@NotNull ItemPath path, @NotNull Class<T> clazz) {
for (;;) {
if (path.isEmpty() && clazz.isInstance(this)) {
return clazz.cast(this);
if (path.isEmpty()) {
if (clazz.isInstance(this)) {
return clazz.cast(this);
}
return null;
}
@Nullable
Object first = path.first();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3320,7 +3320,7 @@ public void test410RecomputeRole() throws Exception {
*
* This test is in this class because I've found no suitable test class in model-impl module.
*/
@Test(enabled = false)
@Test()
public void test500MismatchedDefinitionLookupInTransformedSchema() throws CommonException {
given("obtaining ResourceType definition via model-api");
Task task = getTestTask();
Expand Down

0 comments on commit 941bdf9

Please sign in to comment.