From: aclement Date: Thu, 19 Nov 2009 17:06:37 +0000 (+0000) Subject: avoid using helpers on Member hierarchy X-Git-Tag: V1_6_7~42 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa125f6bc71d9d21999d9e98548c5085d53d6709;p=aspectj.git avoid using helpers on Member hierarchy --- diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java index 32333c204..ee09268a3 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java @@ -11,6 +11,7 @@ *******************************************************************************/ package org.aspectj.weaver.bcel; +import java.lang.reflect.Modifier; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -256,8 +257,8 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger { il.append(InstructionFactory.createLoad(type, register)); register += type.getSize(); } - il.append(Utility.createInvoke(factory, resolvedMember.isStatic() ? Constants.INVOKESTATIC : Constants.INVOKESPECIAL, - resolvedMember)); + il.append(Utility.createInvoke(factory, Modifier.isStatic(resolvedMember.getModifiers()) ? Constants.INVOKESTATIC + : Constants.INVOKESPECIAL, resolvedMember)); il.append(InstructionFactory.createReturn(BcelWorld.makeBcelType(inlineAccessor.getReturnType()))); m_inlineAccessorBcelMethods.put(accessor, new BcelMethod(m_aspectGen.getBcelObjectType(), method.getMethod())); @@ -334,7 +335,7 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger { m_inlineAccessorMethodGens.add(method); InstructionList il = method.getBody(); - if (resolvedMember.isStatic()) { + if (Modifier.isStatic(resolvedMember.getModifiers())) { // field accessed is static so no "this" as accessor sole parameter } else { il.append(InstructionConstants.ALOAD_0); @@ -374,7 +375,7 @@ public class BcelAccessForInlineMunger extends BcelTypeMunger { m_inlineAccessorMethodGens.add(method); InstructionList il = method.getBody(); - if (resolvedMember.isStatic()) { + if (Modifier.isStatic(resolvedMember.getModifiers())) { // field accessed is static so sole parameter is field value to be set il.append(InstructionFactory.createLoad(BcelWorld.makeBcelType(resolvedMember.getReturnType()), 0)); } else {