]> source.dussan.org Git - aspectj.git/commitdiff
fix for clone case in 120916: Jrockit test failures with RC1
authoraclement <aclement>
Thu, 15 Dec 2005 14:15:14 +0000 (14:15 +0000)
committeraclement <aclement>
Thu, 15 Dec 2005 14:15:14 +0000 (14:15 +0000)
weaver/src/org/aspectj/weaver/ResolvedType.java

index ee8b7d0ac8f7d945d0251ee1d0c35f3cc70ec6ed..ce072037fc6703c07aaa48b2cefaf4d0b753d2ab 100644 (file)
@@ -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;