mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-07-25 06:14:46 +02:00
![jhugunin](/assets/img/avatar_default.png)
NPE in bcel.LazyMethodGen when delegating from one ctor to a second that includes a switch.
32 lines
727 B
Java
32 lines
727 B
Java
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 ) { }
|
|
|
|
}
|