diff options
author | aclement <aclement> | 2006-11-21 16:27:36 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-11-21 16:27:36 +0000 |
commit | e022f649ea1fce716d16fc0d18b4c6aed48f8b30 (patch) | |
tree | 2565b0b12245a69dfec91b37c1a2f5b53fd2adeb | |
parent | 25d72696da5568ab33ec8f4739a2542cf01437c9 (diff) | |
download | aspectj-e022f649ea1fce716d16fc0d18b4c6aed48f8b30.tar.gz aspectj-e022f649ea1fce716d16fc0d18b4c6aed48f8b30.zip |
test and fix for 164633 - problem with decp incorrectly targetting an inner type
-rw-r--r-- | tests/bugs153/pr164633/Model.java | 35 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java | 1 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 5 |
3 files changed, 41 insertions, 0 deletions
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 @@ <compile files="TestAspect.aj"/> </ajc-test> + <ajc-test dir="bugs153/pr164633" title="incompatibleclasschange"> + <compile files="Model.java"/> + <run class="test.Model"/> + </ajc-test> + <ajc-test dir="bugs153/pr162135" title="bcexception in annotation style around advice - 2"> <compile files="Foo2.java" options="-1.5"/> <run class="Foo2"/> |