mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-03 05:54:57 +02:00
24 lines
391 B
Plaintext
24 lines
391 B
Plaintext
import java.io.FileNotFoundException;
|
|
|
|
public aspect ConstructorCall {
|
|
|
|
pointcut p() : call(public C1.new());
|
|
|
|
before() throws FileNotFoundException : p() {
|
|
throw new FileNotFoundException();
|
|
}
|
|
|
|
}
|
|
|
|
class C1 {
|
|
|
|
// shouldn't get the warning against the constructor
|
|
public C1() throws FileNotFoundException {
|
|
}
|
|
|
|
public void m1() throws FileNotFoundException {
|
|
new C1();
|
|
}
|
|
|
|
}
|