View | Details | Raw Unified | Return to bug 115235 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/aspectj/systemtest/ajc150/Ajc150Tests.java (+7 lines)
Lines 702-707 Link Here
702
	  runTest("no verify error with two args pcds");
702
	  runTest("no verify error with two args pcds");
703
  }
703
  }
704
  
704
  
705
  public void testNoStackOverflowWithCircularPCDInGenericAspect() {
706
	  runTest("no StackOverflowError with circular pcd in generic aspect");
707
  }
708
  
709
  public void testNoStackOverflowWithCircularPCDInGenericAspect2() {
710
	  runTest("no StackOverflowError with circular pcd in generic aspect - 2");
711
  }
705
  
712
  
706
  // helper methods.....
713
  // helper methods.....
707
  
714
  
(-)src/org/aspectj/systemtest/ajc150/ajc150.xml (+13 lines)
Lines 970-975 Link Here
970
        <run class="PR113447e"/>
970
        <run class="PR113447e"/>
971
    </ajc-test>
971
    </ajc-test>
972
972
973
    <ajc-test dir="bugs150" title="no StackOverflowError with circular pcd in generic aspect">
974
        <compile files="pr115235.aj" options="-1.5">
975
        	<message kind="warning" line="3" text="advice defined in GenericAbstractAspect has not been applied [Xlint:adviceDidNotMatch]"/>
976
        	<message kind="error" text="circular pointcut declaration involving: pc()"/>
977
        	<message kind="error" line="20" text="circular pointcut declaration involving: pc2()"/>
978
	    </compile>
979
    </ajc-test> 
980
981
    <ajc-test dir="bugs150" title="no StackOverflowError with circular pcd in generic aspect - 2">
982
        <compile files="pr115235b.aj" options="-1.5">
983
        </compile>
984
    </ajc-test>
985
973
    <!-- ============================================================================ -->
986
    <!-- ============================================================================ -->
974
    <!-- ============================================================================ -->
987
    <!-- ============================================================================ -->
975
    
988
    
(-)bugs150/pr115235.aj (+22 lines)
Added Link Here
1
abstract aspect GenericAbstractAspect<T>{
2
	abstract protected pointcut pc();
3
	before() : pc() {}
4
}
5
6
aspect Concrete extends GenericAbstractAspect<Concrete> {
7
	// should get circular dependency error message from this
8
	protected pointcut pc() : pc();
9
}
10
11
aspect Concrete2 extends GenericAbstractAspect<Concrete2> {
12
	// this  should compile as expected
13
	protected pointcut pc() : p1();	
14
	pointcut p1() : call(void Concrete2.foo(..));
15
}
16
17
aspect Concrete3 extends GenericAbstractAspect<Concrete3> {
18
	// should get circular dependency error message from this
19
	protected pointcut pc() : pc1();
20
	pointcut pc1() : pc2();
21
	pointcut pc2() : pc();
22
}
(-)bugs150/pr115235b.aj (+28 lines)
Added Link Here
1
abstract aspect GenericAbstractAspect<T> {
2
	abstract protected pointcut pc();
3
	before() : pc() {}
4
}
5
6
abstract aspect SubGenericAspect<T> extends GenericAbstractAspect<T> {
7
	abstract protected pointcut pc1();
8
	abstract protected pointcut pc3();
9
10
	protected pointcut pc() : pc1();
11
	protected pointcut pc2() : pc3();
12
}
13
14
// this should compile with no errors
15
aspect Concrete2 extends SubGenericAspect<String> {	
16
	protected pointcut pc() : pc1();
17
	protected pointcut pc1() :pc3();
18
	protected pointcut pc3() : execution(* *(String));
19
}
20
21
class C {
22
	
23
	public void method(String s) {	
24
	}
25
	
26
	public void method2(int i) {	
27
	}
28
}

Return to bug 115235