aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs
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
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')
-rw-r--r--tests/bugs/InterfaceInitializerOrder.java26
-rw-r--r--tests/bugs/SubtypeConstructorCW.java4
2 files changed, 28 insertions, 2 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(",");
+ }
+}
diff --git a/tests/bugs/SubtypeConstructorCW.java b/tests/bugs/SubtypeConstructorCW.java
index d3b6a8765..f37ac8b37 100644
--- a/tests/bugs/SubtypeConstructorCW.java
+++ b/tests/bugs/SubtypeConstructorCW.java
@@ -7,8 +7,8 @@ class C implements Runnable { // CW 5
}
}
class F implements Runnable {
- F(int i) {// CW 10
- }
+ F(int i) {}// CW 10
+
public void run() {
}
}