From: aclement Date: Fri, 22 Aug 2008 23:36:20 +0000 (+0000) Subject: 163005: testcode X-Git-Tag: V162DEV_M1~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d0847f9ab70e8891bf1f5569c1740f0baa0d59cb;p=aspectj.git 163005: testcode --- diff --git a/tests/bugs162/pr163005/ProblemAspect.java b/tests/bugs162/pr163005/ProblemAspect.java new file mode 100644 index 000000000..e9cd5983f --- /dev/null +++ b/tests/bugs162/pr163005/ProblemAspect.java @@ -0,0 +1,13 @@ +public aspect ProblemAspect { + + 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); + + } +} diff --git a/tests/bugs162/pr163005/SomeClass.java b/tests/bugs162/pr163005/SomeClass.java new file mode 100644 index 000000000..d9abe3651 --- /dev/null +++ b/tests/bugs162/pr163005/SomeClass.java @@ -0,0 +1,4 @@ +public class SomeClass implements SomeInterface { + public static void main(String []argv) {} +} + diff --git a/tests/bugs162/pr163005/SomeInterface.java b/tests/bugs162/pr163005/SomeInterface.java new file mode 100644 index 000000000..dd9e8134e --- /dev/null +++ b/tests/bugs162/pr163005/SomeInterface.java @@ -0,0 +1,4 @@ +public interface SomeInterface { + Class ADAPTER = SomeInterface.class; +} +