aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs153
diff options
context:
space:
mode:
authoraclement <aclement>2006-08-22 15:22:06 +0000
committeraclement <aclement>2006-08-22 15:22:06 +0000
commit945a257776a5879251ccb1b90cf24fd1d89bcfe6 (patch)
tree43cf57a61f1a23af4bc9be81d02d2234901eba93 /tests/bugs153
parent41af7600c8661ff5b7a66a1e97fb865b562bc296 (diff)
downloadaspectj-945a257776a5879251ccb1b90cf24fd1d89bcfe6.tar.gz
aspectj-945a257776a5879251ccb1b90cf24fd1d89bcfe6.zip
fixes for 149560: (1) correct the bcel code for creating clinit call (2) don't let singleton aspects be implemented as late type mungers, the clinit manipulation breaks.
Diffstat (limited to 'tests/bugs153')
-rw-r--r--tests/bugs153/pr149560/AnnStyle.java20
-rw-r--r--tests/bugs153/pr149560/CodeStyle.java17
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/bugs153/pr149560/AnnStyle.java b/tests/bugs153/pr149560/AnnStyle.java
new file mode 100644
index 000000000..1941e6ca7
--- /dev/null
+++ b/tests/bugs153/pr149560/AnnStyle.java
@@ -0,0 +1,20 @@
+import org.aspectj.lang.annotation.*;
+import org.aspectj.lang.*;
+
+@Aspect
+class MyAspect {
+ @After("staticinitialization(*)")
+ public void x(JoinPoint.StaticPart thisJoinPointStaticPart) {
+ System.out.println("after initialization "+thisJoinPointStaticPart);
+ }
+}
+
+public aspect AnnStyle {
+
+ static {
+ }
+
+ public static void main(String []argv) {
+ System.out.println("InstanceExists?"+Aspects.hasAspect(MyAspect.class));
+ }
+}
diff --git a/tests/bugs153/pr149560/CodeStyle.java b/tests/bugs153/pr149560/CodeStyle.java
new file mode 100644
index 000000000..09aaf48cd
--- /dev/null
+++ b/tests/bugs153/pr149560/CodeStyle.java
@@ -0,0 +1,17 @@
+import org.aspectj.lang.*;
+
+aspect MyAspect {
+ after(): staticinitialization(*) {
+ System.out.println("after initialization "+thisJoinPointStaticPart);
+ }
+}
+
+public aspect CodeStyle {
+
+ static {
+ }
+
+ public static void main(String []argv) {
+ System.out.println("InstanceExists?"+Aspects.hasAspect(MyAspect.class));
+ }
+}