From e022f649ea1fce716d16fc0d18b4c6aed48f8b30 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 21 Nov 2006 16:27:36 +0000 Subject: [PATCH] test and fix for 164633 - problem with decp incorrectly targetting an inner type --- tests/bugs153/pr164633/Model.java | 35 +++++++++++++++++++ .../systemtest/ajc153/Ajc153Tests.java | 1 + .../org/aspectj/systemtest/ajc153/ajc153.xml | 5 +++ 3 files changed, 41 insertions(+) create mode 100644 tests/bugs153/pr164633/Model.java diff --git a/tests/bugs153/pr164633/Model.java b/tests/bugs153/pr164633/Model.java new file mode 100644 index 000000000..71a94a0f6 --- /dev/null +++ b/tests/bugs153/pr164633/Model.java @@ -0,0 +1,35 @@ + +package test; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.io.Serializable; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +aspect BoundEntityAspect { + + interface BoundBean extends Serializable {} + + declare parents: Model || *ChangeL implements BoundBean;//test.* && !BoundEntityAspect implements BoundBean; + + public synchronized PropertyChangeSupport BoundBean.getPropertyChangeSupport() { + return null; + } + +} + +public class Model { + + private PropertyChangeListener changeListener = new ChangeL(); + + protected class ChangeL implements PropertyChangeListener { + public void propertyChange(PropertyChangeEvent evt) { + getPropertyChangeSupport();//.firePropertyChange("valid", null, null); + } + } + + public static void main(String[] args) { + new Model().changeListener.propertyChange(null); + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index a1927d78e..8d4203db2 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -33,6 +33,7 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testAnnotationStyleBcException_pr162135_3() { runTest("bcexception in annotation style around advice - 3");} // public void testAnnotationStyleBcException_pr162135_4() { runTest("bcexception in annotation style around advice - 4");} // public void testAnnotationStyleBcException_pr162135_5() { runTest("bcexception in annotation style around advice - 5");} + public void testIncompatibleClassChangeWithITD_pr164633() { runTest("incompatibleclasschange");} public void testComplexPointcut_pr162657() { runTest("complex pointcut");} public void testGenericsInPointcuts_pr161502() { runTest("generics in pointcuts");} public void testGenericsInPointcuts_pr161502_2() { runTest("generics in pointcuts - 2");} diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 6ea110e41..64bda5161 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -24,6 +24,11 @@ + + + + + -- 2.39.5