Browse Source

avoid using helpers on Member hierarchy

tags/V1_6_7
aclement 14 years ago
parent
commit
eaa88f5067

+ 2
- 2
weaver/src/org/aspectj/weaver/bcel/BcelTypeMunger.java View File

@@ -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 "

+ 1
- 1
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java View File

@@ -552,7 +552,7 @@ public class BcelWorld extends World implements Repository {
// look for the method there
for (Iterator<ResolvedMember> 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();

+ 1
- 1
weaver/src/org/aspectj/weaver/bcel/LazyClassGen.java View File

@@ -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;
}
}

+ 1
- 1
weaver/src/org/aspectj/weaver/bcel/Utility.java View File

@@ -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;

Loading…
Cancel
Save