réplica de
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-26 05:57:44 +02:00
![jhugunin](/assets/img/avatar_default.png)
[Bug 39458] New: Compiler crash in ajc 1.1 [Bug 39460] New: Missing import crashes compiler
22 líneas
836 B
Java
22 líneas
836 B
Java
import org.aspectj.lang.*;
|
|
import org.aspectj.lang.reflect.*;
|
|
import java.lang.reflect.Method;
|
|
//import java.lang.reflect.InvocationTargetException; <- crash with this line commented out
|
|
|
|
public aspect MissingImport {
|
|
Object around() :
|
|
call(* *(..)) && !within(ImposterProcessing+) {
|
|
MethodSignature sig = (MethodSignature)thisJoinPoint.getSignature();
|
|
try {
|
|
Method meth = ImposterProcessing.class.getMethod("dynamicThrow", new Class[] { Throwable.class });
|
|
meth.invoke(this, new Object[] { null });
|
|
} catch (InvocationTargetException e) { // expect CE
|
|
throw new RuntimeException("framework error in throwing test exception ", e);
|
|
} catch (IllegalAccessException e) {
|
|
throw new RuntimeException("framework error in throwing test exception ", e);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
class ImposterProcessing { } |