@@ -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 " |
@@ -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(); |
@@ -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; | |||
} | |||
} |
@@ -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; |