--- /dev/null
+// Bug reported that we incorrectly consider static methods when looking at
+// binary weaving decp rules - we shouldn't consider them overriding
+
+import java.util.*;
+
+public class SubClassLoader {
+ private static List l;
+
+ class Inner {
+ public void foo() {
+ System.err.println(l.toString());
+ }
+ }
+
+
+/*
+ // this one would override java.lang.ClassLoader.access$000 on an IBM VM
+ public static List access$000(ClassLoader cl,String s,byte[] bs,int i,int j,Object o) {
+ return null;
+ }
+
+ // this one would override java.lang.ClassLoader.access$000 on an SUN VM:w
+ public static List access$000() {
+ return null;
+ }
+*/
+}
--- /dev/null
+import java.util.*;
+
+public class SubSubClassLoader {
+ private static String l;
+
+ class Inner2 {
+ public void foo() {
+ System.err.println(l.toString());
+ }
+ }
+
+}
--- /dev/null
+public aspect X {
+ declare parents: SubSubClassLoader extends SubClassLoader;
+// declare parents: SubClassLoader extends ClassLoader;
+}
public void testAspectLibrariesAndASM_pr135001() { runTest("aspect libraries and asm");}
public void testStackOverflow_pr136258() { runTest("stack overflow");}
+ public void testIncorrectOverridesEvaluation13() { runTest("incorrect overrides evaluation - 1.3"); }
+ public void testIncorrectOverridesEvaluation15() { runTest("incorrect overrides evaluation - 1.5"); }
/////////////////////////////////////////
public static Test suite() {
<run class="StatisticsTypeImpl"/>
</ajc-test>
+ <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.3">
+ <compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.3" outjar="lib.jar"/>
+ <compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo">
+ <message kind="weave" text="Setting superclass of type 'SubSubClassLoader' (SubSubClassLoader.java) to 'SubClassLoader' (X.aj)"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs152/binaryDecp" title="incorrect overrides evaluation - 1.5">
+ <compile files="SubClassLoader.java,SubSubClassLoader.java" options="-1.5" outjar="lib.jar"/>
+ <compile files="X.aj" inpath="lib.jar" options="-showWeaveInfo">
+ <message kind="weave" text="Setting superclass of type 'SubSubClassLoader' (SubSubClassLoader.java) to 'SubClassLoader' (X.aj)"/>
+ </compile>
+ </ajc-test>
+
</suite>
\ No newline at end of file