if (acceptAttribute(attribute)) {
RuntimeAnnotations rvs = (RuntimeAnnotations) attribute;
// we don't need to look for several attribute occurence since it cannot happen as per JSR175
- if (!isCodeStyleAspect) {
+ if (!isCodeStyleAspect && !javaClass.isInterface()) {
hasAtAspectAnnotation = handleAspectAnnotation(rvs, struct);
//TODO AV - if put outside the if isCodeStyleAspect then we would enable mix style
hasAtPrecedenceAnnotation = handlePrecedenceAnnotation(rvs, struct);
new AndPointcut(left,rightRight))
);
} else if (isOr(right) && isOr(left)) {
- // (A || B) && (C || D) => (¬A && B && ¬C && D) || (B && C) || (A && ¬C && D) || (A && ¬B && C)
+ // (A || B) && (C || D) => (A && C) || (A && D) || (B && C) || (B && D)
Pointcut A = pullUpDisjunctions(((OrPointcut)left).getLeft());
Pointcut B = pullUpDisjunctions(((OrPointcut)left).getRight());
Pointcut C = pullUpDisjunctions(((OrPointcut)right).getLeft());
Pointcut D = pullUpDisjunctions(((OrPointcut)right).getRight());
- Pointcut newLeft = new OrPointcut(createAndsFor(new Pointcut[]{not(A),B,not(C),D}),
- createAndsFor(new Pointcut[]{B,C}));
- Pointcut newRight = new OrPointcut(createAndsFor(new Pointcut[]{A,not(C),not(D)}),
- createAndsFor(new Pointcut[]{A,not(B),C}));
+ Pointcut newLeft = new OrPointcut(
+ new AndPointcut(A,C),
+ new AndPointcut(A,D)
+ );
+ Pointcut newRight = new OrPointcut(
+ new AndPointcut(B,C),
+ new AndPointcut(B,D)
+ );
return pullUpDisjunctions(new OrPointcut(newLeft,newRight));
} else {
return new AndPointcut(left,right);