diff options
author | Andy Clement <andrew.clement@gmail.com> | 2012-08-27 10:34:39 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2012-08-27 10:34:39 -0700 |
commit | 024de8c6544bb6cc3d66dbee73f06670b458a563 (patch) | |
tree | c5d55449898b9bfc7db827318fb3d66b6dda2e33 /org.aspectj.matcher/src | |
parent | 63684e55e0fbad7087b8991aea9286c2695a065b (diff) | |
download | aspectj-024de8c6544bb6cc3d66dbee73f06670b458a563.tar.gz aspectj-024de8c6544bb6cc3d66dbee73f06670b458a563.zip |
386888: always attempt to use generics in comparison
Diffstat (limited to 'org.aspectj.matcher/src')
-rw-r--r-- | org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index ace82bca5..b9fe12a3e 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -1977,8 +1977,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl * an additional source location. */ public boolean checkLegalOverride(ResolvedMember parent, ResolvedMember child, int transformerPosition, ResolvedType aspectType) { - // System.err.println("check: " + child.getDeclaringType() + - // " overrides " + parent.getDeclaringType()); + // System.err.println("check: " + child.getDeclaringType() + " overrides " + parent.getDeclaringType()); if (Modifier.isFinal(parent.getModifiers())) { // If the ITD matching is occurring due to pulling in a BinaryTypeBinding then this check can incorrectly // signal an error because the ITD transformer being examined here will exactly match the member it added @@ -1993,10 +1992,8 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl List<ConcreteTypeMunger> transformersOnThisType = wsi.getTypeMungers(nonItdDeclaringType); if (transformersOnThisType != null) { for (ConcreteTypeMunger transformer : transformersOnThisType) { - // relatively crude check - is the ITD - // for the same as the existingmember - // and does it come - // from the same aspect + // relatively crude check - is the ITD for the same as the existingmember + // and does it come from the same aspect if (transformer.aspectType.equals(aspectType)) { if (parent.equalsApartFromDeclaringType(transformer.getSignature())) { return true; @@ -2027,7 +2024,10 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl // !rtParentReturnType.isAssignableFrom(rtChildReturnType); // } } else { - incompatibleReturnTypes = !parent.getReturnType().equals(child.getReturnType()); + ResolvedType rtParentReturnType = parent.resolve(world).getGenericReturnType().resolve(world); + ResolvedType rtChildReturnType = child.resolve(world).getGenericReturnType().resolve(world); + + incompatibleReturnTypes = !rtParentReturnType.equals(rtChildReturnType); } if (incompatibleReturnTypes) { |