From: aclement Date: Wed, 19 Apr 2006 12:52:14 +0000 (+0000) Subject: fix for 137479: better isSynthetic() logic X-Git-Tag: V1_5_2rc1~197 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=edcb418c39b11e244cf70c9c68bc98419bdf8921;p=aspectj.git fix for 137479: better isSynthetic() logic --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index f055002f9..3a8b01c4b 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -199,9 +199,11 @@ public class BcelTypeMunger extends ConcreteTypeMunger { if (!superMethod.getName().equals("")) { 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; + } } } }