+++ /dev/null
-import java.util.*;
-import org.aspectj.lang.annotation.*;
-
-@Aspect
-public class Broken {
-
- @Pointcut("call( * *.someMethod(..)) && args(arg1, arg2, arg3, status) ")
- public void someMethod2( int arg1, int arg2, int arg3, Status status ) {}
-
- @Pointcut("someMethod2(arg1, arg2, arg3, status) && if()")
- public static boolean someMethod2if(int arg1, int arg2, int arg3, Status status) {
- return status.equals( Status.DELETED );
- }
-
- @Pointcut("cflow(execution( * *.doProcess(..) ) && args( context, *, args)) && this(SomeClass+) ")
- public void inSomeClass2(Context context, Map args) {}
-
- @After( "inSomeClass2(context,args) && someMethod2if(arg1, arg2, arg3, status) ")
- public void deleteManagerInSomeClass2( Context context, Map args, int arg1, int arg2, int arg3, Status status) {
-// _log.write( DEBUG, "STATUS2: " + status );
- }
-}
-
-class Status {
- public final static int DELETED = 1;
-}
-
-class Context {}
-
-class SomeClass {
-
- public void doProcess(Context c,Object o, Map m) {
-
- someMethod(1,2,3,new Status());
- someMethod(1,2,3,new Status());
- someMethod(1,2,3,new Status());
- }
-
- public void someMethod(int a, int b, int c, Status s) {
- doProcess(null,null,null);
- }
-}
--- /dev/null
+import java.util.*;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class Broken {
+
+ @Pointcut("call(* someMethod(..)) && args(arg1) && if()")
+ public static boolean someMethod2if(int arg1) {
+ return true;
+ }
+
+ @Pointcut("cflow(execution(* doProcess(..) ) && args(*, args)) && this(SomeClass+) ")
+ public void inSomeClass2(Map args) {}
+
+ @After( "inSomeClass2(args) && someMethod2if(arg1) ")
+ public void deleteManagerInSomeClass2(Map args,int arg1) { }
+
+ public static void main(String[] args) {
+ new SomeClass().doProcess("a",new HashMap());
+ }
+}
+
+class SomeClass {
+
+ public void doProcess(Object o, Map m) {
+ someMethod(1);
+ }
+
+ public void someMethod(int a) { }
+}
// public void testVisibilityProblem_pr149071() { runTest("visibility problem");}
// public void testAdviceNotWovenAspectPath_pr147841() { runTest("advice not woven on aspectpath");}
public void testGenericSignatures_pr148409() { runTest("generic signature problem"); }
+// public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");}
+ public void testCantFindType_pr149322_1() {runTest("can't find type on interface call");}
- public void testCantFindType_pr149322_1() {
- runTest("can't find type on interface call");
- }
-
/////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);