From e555801a094e8f0db6e1a62eb7c920e9c309870e Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Nov 2009 18:35:41 +0000 Subject: [PATCH] avoid using helpers on Member hierarchy --- .../src/org/aspectj/weaver/ResolvedType.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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")) { -- 2.39.5