From: aclement Date: Thu, 15 Dec 2005 14:15:14 +0000 (+0000) Subject: fix for clone case in 120916: Jrockit test failures with RC1 X-Git-Tag: Root_RB_V1_5_0~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=305786094b456b3d17b0d82abe4ab6fbd4f870bc;p=aspectj.git fix for clone case in 120916: Jrockit test failures with RC1 --- diff --git a/weaver/src/org/aspectj/weaver/ResolvedType.java b/weaver/src/org/aspectj/weaver/ResolvedType.java index ee8b7d0ac..ce072037f 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedType.java +++ b/weaver/src/org/aspectj/weaver/ResolvedType.java @@ -1620,8 +1620,13 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl // not marked abstract. The code below this next line seems to make assumptions // about what will have gotten through the compiler based on the normal // java rules. clone goes against these... - if (m2.isProtected() && m2.isNative() && m2.getName().equals("clone")) return +1; - + if (m2.isProtected() && m2.getName().charAt(0)=='c') { + UnresolvedType declaring = m2.getDeclaringType(); + if (declaring!=null) { + if (declaring.getName().equals("java.lang.Object") && m2.getName().equals("clone")) return +1; + } + } + if (Modifier.isAbstract(m1.getModifiers())) return -1; if (Modifier.isAbstract(m2.getModifiers())) return +1;