+++ /dev/null
-public class Event {}
+++ /dev/null
-public aspect Monitor {
- public pointcut handleEvent(Event event):
- execution(* handleEvent(Event, ..)) && args(event);
-
- public pointcut inHandleEvent(Event event): cflow(handleEvent(event));
-
- before(Event event):
- set(* currentView) &&
- inHandleEvent(event) {
- }
-
-}
+++ /dev/null
-public class Sample {
-
- private static Object currentView;
-
- public static void main(String args[]) {
- currentView = "test";
- }
-
-}
--- /dev/null
+public class Event {}
--- /dev/null
+public aspect Monitor {
+ public pointcut handleEvent(Event event):
+ execution(* handleEvent(Event, ..)) && args(event);
+
+ public pointcut inHandleEvent(Event event): cflow(handleEvent(event));
+
+ before(Event event):
+ set(* currentView) &&
+ inHandleEvent(event) {
+System.err.println("advice running");
+ }
+
+}
--- /dev/null
+public class Sample {
+
+// private
+static Object currentView;
+
+ public static void main(String args[]) {
+System.err.println("method running");
+ currentView = "test";
+ }
+
+}
// public void testSuperITDExplosion_pr134425() { runTest("super ITDs");}
// public void testMisbehavingDeclareAnnotation_pr135865() { runTest("misbehaving declare annotation");}
// public void testMisbehavingDeclareAnnotation_pr135865_2() { runTest("misbehaving declare annotation - 2");}
-// public void testverifyErrNoTypeCflowField_pr145693() {runTest("verifyErrNoTypeCflowField");}
// public void testBrokenIfArgsCflowAtAj_pr145018() { runTest("ataj crashing with cflow, if and args");}
// public void testItdCallingGenericMethod_pr145391() { runTest("itd calling generic method");}
// public void testItdCallingGenericMethod_pr145391_2() { runTest("itd calling generic method - 2");}
</run>
</ajc-test>
- <ajc-test dir="bugs152/pr145693" title="verifyErrNoTypeCflowField">
- <compile files="Event.java" outjar="cpath.jar"/>
- <compile files="Monitor.aj" outjar="apath.jar" classpath="cpath.jar"/>
- <compile files="Sample.java" options="-Xlint:ignore" aspectpath="apath.jar" outjar="run.jar"/>
- <run class="Sample" classpath="run.jar,apath.jar"/>
- </ajc-test>
+
<ajc-test dir="bugs152/pr145391" title="itd calling generic method">
<compile files="GenericType.java" options="-1.5"/>