diff options
Diffstat (limited to 'tests/bugs/NewSwitch.java')
-rw-r--r-- | tests/bugs/NewSwitch.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs/NewSwitch.java b/tests/bugs/NewSwitch.java new file mode 100644 index 000000000..f07efba6b --- /dev/null +++ b/tests/bugs/NewSwitch.java @@ -0,0 +1,31 @@ +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.reflect.SourceLocation; + +public class NewSwitch { + public static void main(String[] args) { + new NewSwitch(2); + } + + protected NewSwitch() { + this(3); + } + + protected NewSwitch(int p) { + switch (p) { + case 3: break; + } + } +} + +aspect FFDC { + + pointcut initializers( ) : staticinitialization( * ) || initialization( *.new(..) ); + pointcut methodsAndConstructors( ) : execution(* *(..)) || execution(new(..) ); + pointcut guarded( ) : initializers( ) || methodsAndConstructors( ); + + final pointcut nonStaticContext( Object o ) : this( o ); + + after(Object o) throwing(Throwable t) : guarded( ) && nonStaticContext( o ) { } + +} |