diff options
author | aclement <aclement> | 2006-06-28 11:44:10 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-06-28 11:44:10 +0000 |
commit | 2f2f5683643a0f1e0856ac43fa590c4b39f1be26 (patch) | |
tree | 5d4d5e5c4c8e3cf4fa52486dbec9ea6c9aaf0be0 /weaver/src | |
parent | 21e06a69892469bab688d2315e7e034047431082 (diff) | |
download | aspectj-2f2f5683643a0f1e0856ac43fa590c4b39f1be26.tar.gz aspectj-2f2f5683643a0f1e0856ac43fa590c4b39f1be26.zip |
bit of reordering to Ajc152Tests - and fixed 148972V1_5_2_final
Diffstat (limited to 'weaver/src')
-rw-r--r-- | weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index cee9a43f0..ace4bb570 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -200,9 +200,11 @@ public class BcelTypeMunger extends ConcreteTypeMunger { LazyMethodGen subMethod = findMatchingMethod(newParentTarget, superMethod); if (subMethod!=null && !subMethod.isBridgeMethod()) { // FIXME asc is this safe for all bridge methods? if (!(subMethod.isSynthetic() && superMethod.isSynthetic())) { - cont = enforceDecpRule3_visibilityChanges(weaver, newParent, superMethod, subMethod) && cont; + if (!(subMethod.isStatic() && subMethod.getName().startsWith("access$"))) { // ignore generated accessors + cont = enforceDecpRule3_visibilityChanges(weaver, newParent, superMethod, subMethod) && cont; cont = enforceDecpRule4_compatibleReturnTypes(weaver, superMethod, subMethod) && cont; cont = enforceDecpRule5_cantChangeFromStaticToNonstatic(weaver,munger.getSourceLocation(),superMethod,subMethod) && cont; + } } } } @@ -331,6 +333,8 @@ public class BcelTypeMunger extends ConcreteTypeMunger { boolean cont = true; String superReturnTypeSig = superMethod.getReturnType().getSignature(); String subReturnTypeSig = subMethod.getReturnType().getSignature(); + superReturnTypeSig = superReturnTypeSig.replace('.','/'); + subReturnTypeSig = subReturnTypeSig.replace('.','/'); if (!superReturnTypeSig.equals(subReturnTypeSig)) { // Allow for covariance - wish I could test this (need Java5...) ResolvedType subType = weaver.getWorld().resolve(subMethod.getReturnType()); @@ -340,6 +344,9 @@ public class BcelTypeMunger extends ConcreteTypeMunger { weaver.getWorld().getMessageHandler().handleMessage(MessageUtil.error( "The return type is incompatible with "+superMethod.getDeclaringType()+"."+superMethod.getName()+superMethod.getParameterSignature(), subMethod.getSourceLocation())); +// this just might be a better error message... +// "The return type '"+subReturnTypeSig+"' is incompatible with the overridden method "+superMethod.getDeclaringType()+"."+ +// superMethod.getName()+superMethod.getParameterSignature()+" which returns '"+superReturnTypeSig+"'", cont=false; } } |