org.aspectj/tests/bugs/declareBinding/SampleExceptionHandling1.java
jhugunin d78d9ed489 fix and tests for at least 2 bugs:
Bugzilla Bug 42740
	  	declare error fails on pointcuts composed from multiple classes
Bugzilla Bug 42746
	  	within() pcd is confused for certain declare softs

and probably:
Bugzilla Bug 42739
	  	Compiler crash in ajc head (post 1.1.1 rc1)
2003-09-10 00:35:18 +00:00

21 rader
601 B
Java

public class SampleExceptionHandling1 {
public void mumble() throws java.io.IOException { } // CE expected
}
/** @author Ron Bodkin */
aspect Library {
public pointcut executionsThrowingChecked() :
execution(* *(..) throws (Exception+ && !RuntimeException));
}
/** @author Ron Bodkin */
aspect SampleExceptionHandling {
public pointcut scope() : within(SampleExceptionHandling1);
public pointcut executionsThrowingChecked() :
Library.executionsThrowingChecked() && scope();
declare error : executionsThrowingChecked():
"no checked exceptions";
}