diff options
Diffstat (limited to 'tests/bugs/tjpStaticPart/Exceptions.java')
-rw-r--r-- | tests/bugs/tjpStaticPart/Exceptions.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/bugs/tjpStaticPart/Exceptions.java b/tests/bugs/tjpStaticPart/Exceptions.java new file mode 100644 index 000000000..056443e8b --- /dev/null +++ b/tests/bugs/tjpStaticPart/Exceptions.java @@ -0,0 +1,18 @@ +package tjpStaticPart; + +import java.io.*; + +import org.aspectj.lang.*; + +public aspect Exceptions { + + pointcut exceptionMethods () : + call(java.io.*.new(..) throws FileNotFoundException); + + Object around () throws FileNotFoundException : exceptionMethods() && !within(Exceptions) { + System.err.println("before: " + thisJoinPoint.getStaticPart()); + Object obj = proceed(); + System.err.println("after: " + thisJoinPoint.getStaticPart()); + return obj; + } +}
\ No newline at end of file |