aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
diff options
context:
space:
mode:
authoraclement <aclement>2004-08-17 14:04:29 +0000
committeraclement <aclement>2004-08-17 14:04:29 +0000
commit84e4e53608871ab3ad0381d19abd8fa2e1bc4533 (patch)
tree1c22d44c9207d48ebba4539bd74bb03db9018e8e /tests/bugs
parent0e52e76e3ea893f5f553419924cba8aebad29be4 (diff)
downloadaspectj-84e4e53608871ab3ad0381d19abd8fa2e1bc4533.tar.gz
aspectj-84e4e53608871ab3ad0381d19abd8fa2e1bc4533.zip
Test and fix for Bugzilla Bug 62642
proper handling of ExceptionInIntializer inside <clinit> in presence of after throwing advice
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/pr62642.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/bugs/pr62642.java b/tests/bugs/pr62642.java
new file mode 100644
index 000000000..30cc50611
--- /dev/null
+++ b/tests/bugs/pr62642.java
@@ -0,0 +1,40 @@
+class C {
+ static int x = 13;
+ int y;
+
+ public C() {
+ y= 14;
+ }
+
+ public static void main(String args[]) {
+
+ C m = new C();
+ m.y = 3;
+ System.out.println("hi");
+ }
+}
+
+public class pr62642 {
+ public static void main(String[] args) {
+ try {
+ C.main(null);
+ } catch (ExceptionInInitializerError eiie) {
+ System.err.println("EIIE="+eiie.toString());
+ System.err.println("CAUSE="+eiie.getCause().toString());
+ }
+ }
+}
+
+
+aspect Aspect {
+
+ before () : within(*) && !within(pr62642) {
+ System.out.println("BEFORE "+ thisJoinPointStaticPart.getKind() +
+ " at " + thisJoinPointStaticPart.getSourceLocation());
+ }
+
+ after () : within(*) && !within(pr62642) {
+ System.out.println("AFTER " + thisJoinPointStaticPart.getKind() +
+ " at " + thisJoinPointStaticPart.getSourceLocation());
+ }
+} \ No newline at end of file