From: aclement Date: Wed, 19 Apr 2006 11:45:46 +0000 (+0000) Subject: test for 137479 X-Git-Tag: V1_5_2rc1~199 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=980483b367011c75ed7e90b2ddb5a06b34199731;p=aspectj.git test for 137479 --- diff --git a/tests/bugs152/binaryDecp/SubClassLoader.java b/tests/bugs152/binaryDecp/SubClassLoader.java new file mode 100644 index 000000000..f5ba9a4b3 --- /dev/null +++ b/tests/bugs152/binaryDecp/SubClassLoader.java @@ -0,0 +1,27 @@ +// 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; + } +*/ +} diff --git a/tests/bugs152/binaryDecp/SubSubClassLoader.java b/tests/bugs152/binaryDecp/SubSubClassLoader.java new file mode 100644 index 000000000..4b6b7f662 --- /dev/null +++ b/tests/bugs152/binaryDecp/SubSubClassLoader.java @@ -0,0 +1,12 @@ +import java.util.*; + +public class SubSubClassLoader { + private static String l; + + class Inner2 { + public void foo() { + System.err.println(l.toString()); + } + } + +} diff --git a/tests/bugs152/binaryDecp/X.aj b/tests/bugs152/binaryDecp/X.aj new file mode 100644 index 000000000..837c825d0 --- /dev/null +++ b/tests/bugs152/binaryDecp/X.aj @@ -0,0 +1,4 @@ +public aspect X { + declare parents: SubSubClassLoader extends SubClassLoader; +// declare parents: SubClassLoader extends ClassLoader; +} diff --git a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java index 06c11766c..bff94e8cd 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc152/Ajc152Tests.java @@ -19,6 +19,8 @@ public class Ajc152Tests extends org.aspectj.testing.XMLBasedAjcTestCase { 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() { diff --git a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml index f020e6dc6..7ee33b766 100644 --- a/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml +++ b/tests/src/org/aspectj/systemtest/ajc152/ajc152.xml @@ -20,4 +20,18 @@ + + + + + + + + + + + + + + \ No newline at end of file