From 659bd1bd5a03eb975f5bdd2a2c6687d16bf4abca Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 24 Mar 2008 19:48:27 +0000 Subject: [PATCH] 214994: generic itds alias NPE: tests and fix --- tests/bugs160/pr214994/Broke.java | 22 +++++++++++++++++++ .../systemtest/ajc160/Ajc160Tests.java | 3 +++ .../org/aspectj/systemtest/ajc160/ajc160.xml | 5 +++++ 3 files changed, 30 insertions(+) create mode 100644 tests/bugs160/pr214994/Broke.java diff --git a/tests/bugs160/pr214994/Broke.java b/tests/bugs160/pr214994/Broke.java new file mode 100644 index 000000000..fa1052227 --- /dev/null +++ b/tests/bugs160/pr214994/Broke.java @@ -0,0 +1,22 @@ +import java.util.*; + +interface Item {} +interface Container {} +interface CompositeItem {} +interface CompositeContainer {} + +public abstract aspect Broke { + + private C CompositeItem.container; + + public List CompositeContainer.itemList = new ArrayList(); + + public CompositeContainer CompositeContainer.addItem(I i) { + itemList.add(i); + + i.container = this; + + return this; + } + +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java index 93f01640b..61e6b9e27 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java @@ -22,6 +22,9 @@ import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // AspectJ1.6.0rc1 + public void testGenericITDs_pr214994() { + runTest("generic itd"); + } public void testGenericDecpLtw_pr223605() { runTest("generic decp ltw"); } diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml index b7167cc78..bda4a19c8 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml +++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml @@ -3,6 +3,11 @@ + + + + + -- 2.39.5