alt1 = new ArrayList<PolicyComponent>(alt1);
alt2 = new ArrayList<PolicyComponent>(alt2);
Iterator<? extends PolicyComponent> iterator = alt1.iterator();
while (iterator.hasNext()) {
PolicyComponent a1 = iterator.next();
if (a1 instanceof Assertion) {
Assertion assertion = findCompatibleAssertion((Assertion)a1, alt2, remove);
if (assertion != null) {
if (remove) {
iterator.remove();
}
all.addPolicyComponent(assertion);
} else if (!strict && ((Assertion)a1).isIgnorable()) {
all.addPolicyComponent(a1);
} else if (strict || !((Assertion)a1).isIgnorable()) {
return null;
}
}
}
iterator = alt2.iterator();
while (iterator.hasNext()) {
PolicyComponent a2 = iterator.next();
if (a2 instanceof Assertion) {
Assertion assertion = findCompatibleAssertion((Assertion)a2, alt1, remove);
if (assertion != null) {
all.addPolicyComponent(assertion);
} else if (!strict && ((Assertion)a2).isIgnorable()) {