diff options
author | aclement <aclement> | 2008-10-30 19:03:56 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-10-30 19:03:56 +0000 |
commit | 3594800a4c212228183822ec2db3962635655d83 (patch) | |
tree | 609ab8ac82f99f7b81722172c19340d81c468862 /tests/bugs163 | |
parent | fc7ac6820b4ab997cd40cf781f1b7fd3271c0d61 (diff) | |
download | aspectj-3594800a4c212228183822ec2db3962635655d83.tar.gz aspectj-3594800a4c212228183822ec2db3962635655d83.zip |
tests for 163005: upgraded test for 80571
Diffstat (limited to 'tests/bugs163')
-rw-r--r-- | tests/bugs163/pr163005/Code.java | 25 | ||||
-rw-r--r-- | tests/bugs163/pr163005/Code2.java | 14 |
2 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs163/pr163005/Code.java b/tests/bugs163/pr163005/Code.java new file mode 100644 index 000000000..5ef476c30 --- /dev/null +++ b/tests/bugs163/pr163005/Code.java @@ -0,0 +1,25 @@ +public aspect Code { + + pointcut init(): initialization(Object+.new(..)); + + pointcut staticinit(): staticinitialization(Object+); + + Class around(String className): cflowbelow(init() || staticinit()) && +call(Class Class.forName(String)) && args(className) { + System.out.println("Test"); + return proceed(className); + + } + public static void main(String[] argv) { + new SomeClass(); + } +} + +class SomeClass implements SomeInterface { + +} + +interface SomeInterface { + Class ADAPTER = SomeInterface.class; +} + diff --git a/tests/bugs163/pr163005/Code2.java b/tests/bugs163/pr163005/Code2.java new file mode 100644 index 000000000..35283a0a8 --- /dev/null +++ b/tests/bugs163/pr163005/Code2.java @@ -0,0 +1,14 @@ +interface Foo { + public static final Object dummy = new Object(); +} + +aspect Code2 { + Object around(): call(Object.new(..)) { + return proceed(); + } + + public static void main(String[] args) { + System.out.println(Foo.dummy); + } +} + |