From: aclement Date: Tue, 17 Nov 2009 18:35:41 +0000 (+0000) Subject: avoid using helpers on Member hierarchy X-Git-Tag: V1_6_7~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e555801a094e8f0db6e1a62eb7c920e9c309870e;p=aspectj.git avoid using helpers on Member hierarchy --- diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index c6b2b15b8..67e38a8d9 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -1991,11 +1991,13 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl return false; } - if (parent.isStatic() && !child.isStatic()) { + boolean parentStatic = Modifier.isStatic(parent.getModifiers()); + boolean childStatic = Modifier.isStatic(child.getModifiers()); + if (parentStatic && !childStatic) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERRIDDEN_STATIC, child, parent), child .getSourceLocation(), null); return false; - } else if (child.isStatic() && !parent.isStatic()) { + } else if (childStatic && !parentStatic) { world.showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.ITD_OVERIDDING_STATIC, child, parent), child .getSourceLocation(), null); return false; @@ -2013,7 +2015,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl // assumptions // about what will have gotten through the compiler based on the normal // java rules. clone goes against these... - if (m2.isProtected() && m2.getName().charAt(0) == 'c') { + if (Modifier.isProtected(m2.getModifiers()) && m2.getName().charAt(0) == 'c') { UnresolvedType declaring = m2.getDeclaringType(); if (declaring != null) { if (declaring.getName().equals("java.lang.Object") && m2.getName().equals("clone")) {