</compile>
</ajc-test>
+ <ajc-test dir="bugs" pr="36803"
+ title="cflow concretization causing assertion failure">
+ <compile files="CflowConcrete.java"/>
+ <run class="CflowConcrete"/>
+ </ajc-test>
+
</suite>
--- /dev/null
+// for Bug#: 31423
+import org.aspectj.testing.Tester;
+
+
+public class CflowConcrete {
+ public static void main(String[] args) {
+ }
+}
+
+aspect TestAjc {
+ pointcut notMySelf(): !within(TestAjc) && !cflow(within(TestAjc));
+
+ pointcut eachCall(): notMySelf() && call(* *.*(..));
+ pointcut eachExecution(): notMySelf() && execution(* *.*(..)) ;
+
+ before(): eachCall() { System.out.println(thisJoinPoint); }
+
+ before(): eachExecution() { System.out.println(thisJoinPoint); }
+}
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite>
-
+
<!--
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
return new KindedPointcut(kind, signature);
- //return this; //??? no pointers out of here so we're okay
}
public Shadow.Kind getKind() {
* @param bindings a Map from formal index in the current lexical context
* -> formal index in the concrete advice that will run
*
- * ??? does this return a new pointcut
+ * This must always return a new Pointcut object (even if the concretized
+ * Pointcut is identical to the resolved one). That behavior is
+ * assumed in many places.
* XXX fix implementors to handle state
*/
protected abstract Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings);
public Pointcut concretize1(
ResolvedTypeX inAspect,
IntMap bindings) {
- return this;
+ return makeMatchesNothing(state);
}
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
- return this; //??? no pointers out of here so we're okay
+ return new WithinPointcut(typePattern);
}
}
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
- return this; //??? no pointers out of here so we're okay
+ return new WithincodePointcut(signature);
}
}