aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/MissingImport.java
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-07-02 23:12:18 +0000
committerjhugunin <jhugunin>2003-07-02 23:12:18 +0000
commitba41fae6547688e8714d01be27bc81dbbe850f55 (patch)
tree942e8dfd6ff41b9c2c7d64485734020d9b38b48d /tests/bugs/MissingImport.java
parent2e3c9191a9cb753ff54cf20592dcd0ef14bfc83a (diff)
downloadaspectj-ba41fae6547688e8714d01be27bc81dbbe850f55.tar.gz
aspectj-ba41fae6547688e8714d01be27bc81dbbe850f55.zip
tests and fixes for two awful error message bugs:
[Bug 39458] New: Compiler crash in ajc 1.1 [Bug 39460] New: Missing import crashes compiler
Diffstat (limited to 'tests/bugs/MissingImport.java')
-rw-r--r--tests/bugs/MissingImport.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/bugs/MissingImport.java b/tests/bugs/MissingImport.java
new file mode 100644
index 000000000..c70129e50
--- /dev/null
+++ b/tests/bugs/MissingImport.java
@@ -0,0 +1,22 @@
+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 { } \ No newline at end of file