diff options
author | aclement <aclement> | 2006-08-22 15:22:06 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-08-22 15:22:06 +0000 |
commit | 945a257776a5879251ccb1b90cf24fd1d89bcfe6 (patch) | |
tree | 43cf57a61f1a23af4bc9be81d02d2234901eba93 /tests/bugs153 | |
parent | 41af7600c8661ff5b7a66a1e97fb865b562bc296 (diff) | |
download | aspectj-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.java | 20 | ||||
-rw-r--r-- | tests/bugs153/pr149560/CodeStyle.java | 17 |
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)); + } +} |