org.aspectj/tests/bugs152/pr129282/Initialization.aj
2006-05-31 10:09:27 +00:00

31 lines
685 B
Plaintext

import java.io.FileNotFoundException;
public aspect Initialization {
pointcut preInit() : preinitialization(C.new(String));
before() throws FileNotFoundException : preInit() {
throw new FileNotFoundException();
}
pointcut init() : initialization(C.new());
before() throws FileNotFoundException : init() {
throw new FileNotFoundException();
}
}
class C {
// shouldn't get a warning against this constructor
// since the throwing is handled by the advice
public C() throws FileNotFoundException {
}
// shouldn't get a warning against this constructor
// since the throwing is handled by the advice
public C(String s) throws FileNotFoundException {
}
}