//the assertion doesn't implement IntersectableAssertion so we
//need to try doing a basic intersect ourself
if (a1.getName().equals(a2.getName())) {
if (a1 instanceof PolicyContainingAssertion
&& a2 instanceof PolicyContainingAssertion) {
PolicyContainingAssertion pc1 = (PolicyContainingAssertion)a1;
PolicyContainingAssertion pc2 = (PolicyContainingAssertion)a2;
Policy p1 = pc1.getPolicy();
Policy p2 = pc2.getPolicy();
PolicyIntersector pi = new PolicyIntersector(strict);
if (pi.compatiblePolicies(p1, p2)) {
return a1;
}
} else {