From edcb418c39b11e244cf70c9c68bc98419bdf8921 Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 19 Apr 2006 12:52:14 +0000 Subject: [PATCH] fix for 137479: better isSynthetic() logic --- weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; + } } } } -- 2.39.5