org.aspectj/org.aspectj.ajdt.core/testdata/src1/DeclareSoft.java
2002-12-16 17:58:19 +00:00

27 lines
422 B
Java

import java.io.*;
import org.aspectj.lang.*;
public class DeclareSoft {
public static void main(String[] args) {
try {
new DeclareSoft().m();
} catch (SoftException se) {
return;
}
}
void m() {
InputStream s = new FileInputStream("foobar");
s.close();
}
}
aspect A {
//declare soft: IOException: execution(void m());
declare soft: IOException: foo();
pointcut foo(): execution(void m());
}