diff --git a/src/main/java/spoon/ContractVerifier.java b/src/main/java/spoon/ContractVerifier.java index 5a975d9e2e2..7c4682f11bb 100644 --- a/src/main/java/spoon/ContractVerifier.java +++ b/src/main/java/spoon/ContractVerifier.java @@ -564,12 +564,12 @@ public void scan(CtRole role, CtElement element) { assertTrue("Element of type " + element.getClass().getName() + " not found in Collection value of attribute of role " + role.name() + " of parent type " + parent.getClass().getName(), - ((Collection) attributeOfParent).stream().anyMatch(e -> e == element)); + ((Collection) attributeOfParent).stream().anyMatch(e -> e == element)); } else if (attributeOfParent instanceof Map) { assertTrue("Element of type " + element.getClass().getName() + " not found in Map#values of attribute of role " + role.name() + " of parent type " + parent.getClass().getName(), - ((Map) attributeOfParent).values().stream().anyMatch(e -> e == element)); + ((Map) attributeOfParent).values().stream().anyMatch(e -> e == element)); } else { fail("Attribute of Role " + role + " not checked"); }