--- /dev/null
+
+package test;
+public class Main {
+
+ private static int plus(int first, int second){
+ return first + second;
+ }
+ public static void main(String[] args) {
+ int num = plus(42,13);
+ System.out.println(num);
+ }
+}
--- /dev/null
+package test;
+
+public aspect Profiling {
+ pointcut profile(): execution(* *.*(..)) ;
+
+ private pointcut scope() :
+ if(condition())
+ //&& !(execution(* *.condition())) <- uncomment and infinite loop disappears
+ && !cflow(execution(* *.condition()));
+
+ public static boolean condition(){
+ return (Math.random()<2); //always true
+ }
+ before(): profile() && scope() {
+ System.out.println("Entering method "+thisJoinPointStaticPart.getSignature());
+ }
+}
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+// public void testClashingDeclareAnnos_313026_1() {
+// runTest("clashing declare annos");
+// }
+
+ public void testInfiniteLoop_pr315651() {
+ runTest("infinite loop");
+ }
+
public void testAnnoType_pr314965() {
runTest("anno typo");
}
+
public void testValidateBranchRecursion_314840() {
runTest("validate branch recursion");
}
- public void testClashingDeclareAnnos_313026_1() {
- runTest("clashing declare annos");
- }
public void testClassFileSize_312839_1() {
runTest("class file size - 1");
<suite>
+ <ajc-test dir="bugs169/pr315651" title="infinite loop">
+ <compile files="test/Profiling.aj test/Main.java" options="-1.5"/>
+ <run class="test.Main"/>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr314965" title="anno typo">
<compile files="MinimalExample.java" options="-1.5">
<message kind="warning" text="no match for this type name: AnnotationWithParamAndTypo [Xlint:invalidAbsoluteTypeName]"/>