aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/InterfaceInitializerOrder.java
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2004-01-28 00:36:05 +0000
committerjhugunin <jhugunin>2004-01-28 00:36:05 +0000
commit6cceb1b9c3b53e92166d61435f28318e2b9a8872 (patch)
treebe2ceede849425dd4a40f9b103a059190b90d589 /tests/bugs/InterfaceInitializerOrder.java
parent098317da0a9bf6b3b12ca3f75c20b74fe42c0374 (diff)
downloadaspectj-6cceb1b9c3b53e92166d61435f28318e2b9a8872.tar.gz
aspectj-6cceb1b9c3b53e92166d61435f28318e2b9a8872.zip
fix for Bugzilla Bug 49295
duplicate warning or second join point for constructor-execution
Diffstat (limited to 'tests/bugs/InterfaceInitializerOrder.java')
-rw-r--r--tests/bugs/InterfaceInitializerOrder.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/bugs/InterfaceInitializerOrder.java b/tests/bugs/InterfaceInitializerOrder.java
new file mode 100644
index 000000000..3036bcac9
--- /dev/null
+++ b/tests/bugs/InterfaceInitializerOrder.java
@@ -0,0 +1,26 @@
+import org.aspectj.testing.Tester;
+
+public class InterfaceInitializerOrder {
+ public static void main(String[] args) {
+ Base base = new Base();
+ Tester.checkEqual(InitAspect.inits.toString(), "Super1,Super2,SuperInterface,Base,");
+ }
+}
+
+class Super1 {}
+
+class Super2 extends Super1 {}
+
+interface SuperInterface {}
+
+class Base extends Super2 implements SuperInterface { }
+
+aspect InitAspect {
+ public static StringBuffer inits = new StringBuffer();
+
+ pointcut outerMatch() : initialization(new(..)) && !within(InitAspect);
+ before() : outerMatch() {
+ inits.append(thisJoinPoint.getSignature().getDeclaringType().getName());
+ inits.append(",");
+ }
+}