Browse Source

170467: methods with parameterized parameters not working in ITD overrides relationship. tests and fix.

tags/Root_extensions
aclement 17 years ago
parent
commit
8ab740316c

+ 16
- 0
tests/bugs160/pr170467/Bug.aj View File

@@ -0,0 +1,16 @@
import java.util.*;

// this should be OK, the parameterized forms of Set are the same

abstract class BaseClass { }

aspect BaseClassAspect {
public abstract void BaseClass.setSomething(Set<String> somethings);
}

class ExtendedBaseClass extends BaseClass {
@Override
public void setSomething(Set<String> somethings) { }
}



+ 16
- 0
tests/bugs160/pr170467/Bug2.aj View File

@@ -0,0 +1,16 @@
import java.util.*;

// Trivial testcase to ensure the basics behave

abstract class BaseClass { }

aspect BaseClassAspect {
public abstract void BaseClass.setSomething(Set somethings);
}

class ExtendedBaseClass extends BaseClass {
@Override
public void setSomething(Set somethings) { }
}



+ 1
- 0
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java View File

@@ -21,6 +21,7 @@ import junit.framework.Test;
*/
public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testItdsParameterizedParameters_pr170467() { runTest("itds and parameterized parameters");}
public void testComplexGenerics_pr168044() { runTest("complex generics - 1");}
public void testIncorrectlyMarkingFieldTransient_pr168063() { runTest("incorrectly marking field transient");}
public void testInheritedAnnotations_pr169706() { runTest("inherited annotations");}

+ 7
- 0
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml View File

@@ -4,6 +4,13 @@
<suite>

<!-- first section - dont need a 1.6 vm but fixed in the 1.6 branch of AspectJ -->
<ajc-test dir="bugs160/pr170467" title="itds and parameterized parameters">
<compile files="Bug.aj" options="-1.5"/>
<compile files="Bug2.aj" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs160/pr169706" title="inherited annotations">
<compile files="A.java,B.java,C.java,MyAspect.java,MyAnnotation.java,Test.java" options="-1.5 -showWeaveInfo">
<message kind="weave" text="Join point 'method-call(void C.foo())' in Type 'Test' (Test.java:5) advised by before advice from 'MyAspect' (MyAspect.java:4)"/>

Loading…
Cancel
Save