From eaa88f50674240d63390bf1525abfc1c305175b1 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Nov 2009 18:36:33 +0000 Subject: [PATCH] avoid using helpers on Member hierarchy --- weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java | 4 ++-- weaver/src/org/aspectj/weaver/bcel/BcelWorld.java | 2 +- weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java | 2 +- weaver/src/org/aspectj/weaver/bcel/Utility.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java index e52ab22eb..2c8210961 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java @@ -354,14 +354,14 @@ public class BcelTypeMunger extends ConcreteTypeMunger { private boolean enforceDecpRule3_visibilityChanges(BcelClassWeaver weaver, ResolvedType newParent, ResolvedMember superMethod, LazyMethodGen subMethod) { boolean cont = true; - if (superMethod.isPublic()) { + if (Modifier.isPublic(superMethod.getModifiers())) { if (subMethod.isProtected() || subMethod.isDefault() || subMethod.isPrivate()) { weaver.getWorld().getMessageHandler().handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " + newParent.getName(), superMethod.getSourceLocation())); cont = false; } - } else if (superMethod.isProtected()) { + } else if (Modifier.isProtected(superMethod.getModifiers())) { if (subMethod.isDefault() || subMethod.isPrivate()) { weaver.getWorld().getMessageHandler().handleMessage( MessageUtil.error("Cannot reduce the visibility of the inherited method '" + superMethod + "' from " diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java index 8c62a9777..175041229 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelWorld.java @@ -552,7 +552,7 @@ public class BcelWorld extends World implements Repository { // look for the method there for (Iterator iterator = appearsDeclaredBy.getMethods(true, true); iterator.hasNext();) { ResolvedMember method = iterator.next(); - if (method.isStatic()) { + if (Modifier.isStatic(method.getModifiers())) { if (name.equals(method.getName()) && signature.equals(method.getSignature())) { // we found it declaringType = method.getDeclaringType(); diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java index 51ad90d1f..6ae91ee69 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java @@ -320,7 +320,7 @@ public final class LazyClassGen { ResolvedMember[] fields = type.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { ResolvedMember field = fields[i]; - if (field.getName().equals("serialVersionUID") && field.isStatic() && field.getType().equals(ResolvedType.LONG)) { + if (field.getName().equals("serialVersionUID") && Modifier.isStatic(field.getModifiers()) && field.getType().equals(ResolvedType.LONG)) { return true; } } diff --git a/weaver/src/org/aspectj/weaver/bcel/Utility.java b/weaver/src/org/aspectj/weaver/bcel/Utility.java index e5a760339..70f01234e 100644 --- a/weaver/src/org/aspectj/weaver/bcel/Utility.java +++ b/weaver/src/org/aspectj/weaver/bcel/Utility.java @@ -178,7 +178,7 @@ public class Utility { public static Instruction createSet(InstructionFactory fact, Member signature) { short kind; - if (signature.isStatic()) { + if (Modifier.isStatic(signature.getModifiers())) { kind = Constants.PUTSTATIC; } else { kind = Constants.PUTFIELD; -- 2.39.5