]> source.dussan.org Git - aspectj.git/commitdiff
fix for 137479: better isSynthetic() logic
authoraclement <aclement>
Wed, 19 Apr 2006 12:52:14 +0000 (12:52 +0000)
committeraclement <aclement>
Wed, 19 Apr 2006 12:52:14 +0000 (12:52 +0000)
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java

index f055002f972039bd685dcc7693e1526d86f33c48..3a8b01c4bbecf48232b29c03d09fae152fa2a155 100644 (file)
@@ -199,9 +199,11 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
           if (!superMethod.getName().equals("<init>")) {
                    LazyMethodGen   subMethod = findMatchingMethod(newParentTarget, superMethod);
             if (subMethod!=null && !subMethod.isBridgeMethod()) { // FIXME asc is this safe for all bridge methods?
-              cont = enforceDecpRule3_visibilityChanges(weaver, newParent, superMethod, subMethod) && cont;
-              cont = enforceDecpRule4_compatibleReturnTypes(weaver, superMethod, subMethod)        && cont;
-              cont = enforceDecpRule5_cantChangeFromStaticToNonstatic(weaver,munger.getSourceLocation(),superMethod,subMethod) && cont;
+              if (!(subMethod.isSynthetic() && superMethod.isSynthetic())) {
+                     cont = enforceDecpRule3_visibilityChanges(weaver, newParent, superMethod, subMethod) && cont;
+                     cont = enforceDecpRule4_compatibleReturnTypes(weaver, superMethod, subMethod)        && cont;
+                     cont = enforceDecpRule5_cantChangeFromStaticToNonstatic(weaver,munger.getSourceLocation(),superMethod,subMethod) && cont;
+              }
             }                
           }
         }