From: aclement Date: Thu, 8 May 2008 21:22:29 +0000 (+0000) Subject: 231187: test and fix. Do the parameterization check after ITDs have applied X-Git-Tag: V1_6_1x~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d4477a7ddb3e2a66cec69f6580286b010b1460fe;p=aspectj.git 231187: test and fix. Do the parameterization check after ITDs have applied --- diff --git a/tests/bugs161/pr231187x/Cement.java b/tests/bugs161/pr231187x/Cement.java new file mode 100644 index 000000000..3fd69d035 --- /dev/null +++ b/tests/bugs161/pr231187x/Cement.java @@ -0,0 +1,5 @@ +package concrete; + +public interface Cement { + public int getWeight(); +} diff --git a/tests/bugs161/pr231187x/ConcreteClass.java b/tests/bugs161/pr231187x/ConcreteClass.java new file mode 100644 index 000000000..c0eb8af5c --- /dev/null +++ b/tests/bugs161/pr231187x/ConcreteClass.java @@ -0,0 +1,19 @@ +package concrete; + +import java.util.Vector; + +public class ConcreteClass extends SuperClass { + + @Override + public Vector getSomeTs() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addSomeTs(Vector newTs) { + // TODO Auto-generated method stub + someTs.addAll(newTs); + } + +} diff --git a/tests/bugs161/pr231187x/Main.java b/tests/bugs161/pr231187x/Main.java new file mode 100644 index 000000000..2f98e15be --- /dev/null +++ b/tests/bugs161/pr231187x/Main.java @@ -0,0 +1,14 @@ +package concrete; + +import java.util.*; + +public class Main { + public static void main(String[] args) { + ConcreteClass cc = new ConcreteClass(); + WetCement wc = new WetCement(); + Vector v = new Vector(); + v.add(wc); + cc.addSomeTs(v); + System.out.println("ran!"); + } +} \ No newline at end of file diff --git a/tests/bugs161/pr231187x/SuperClass.java b/tests/bugs161/pr231187x/SuperClass.java new file mode 100644 index 000000000..18c1fe669 --- /dev/null +++ b/tests/bugs161/pr231187x/SuperClass.java @@ -0,0 +1,8 @@ +package concrete; +import java.util.Vector; + +public abstract class SuperClass { + Vector someTs = new Vector(); + public abstract Vector getSomeTs(); + public abstract void addSomeTs(Vector newTs); +} diff --git a/tests/bugs161/pr231187x/SuperClassAspect.aj b/tests/bugs161/pr231187x/SuperClassAspect.aj new file mode 100644 index 000000000..c37074499 --- /dev/null +++ b/tests/bugs161/pr231187x/SuperClassAspect.aj @@ -0,0 +1,12 @@ +package concrete; + +import java.util.Vector; + + +public aspect SuperClassAspect { + declare parents : WetCement implements Cement; + + after(SuperClass sc, Vector cm) returning: execution(void SuperClass.addSomeTs(Vector)) && target(sc) && args(cm) { + // System.out.println(cm); + } +} diff --git a/tests/bugs161/pr231187x/WetCement.java b/tests/bugs161/pr231187x/WetCement.java new file mode 100644 index 000000000..dfefde076 --- /dev/null +++ b/tests/bugs161/pr231187x/WetCement.java @@ -0,0 +1,6 @@ +package concrete; + +public class WetCement { + boolean wet = true; + public int getWeight() { return 5; } +}