From: aclement Date: Mon, 3 Jul 2006 13:49:07 +0000 (+0000) Subject: test and fix for 148737 X-Git-Tag: PRE_PIPELINE~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6834c7692082a20e94f7d88841e6c7c3f96c26a;p=aspectj.git test and fix for 148737 --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java index dde7e8b62..4aff85e38 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/BuildArgParser.java @@ -665,7 +665,7 @@ public class BuildArgParser extends Main { } else if (arg.equals("-source")) { if (args.size() > nextArgIndex) { String level = ((ConfigParser.Arg)args.get(nextArgIndex)).getValue(); - if (level.equals("1.5")){ + if (level.equals("1.5") || level.equals("5")) { buildConfig.setBehaveInJava5Way(true); } unparsedArgs.add("-source"); diff --git a/tests/bugs153/pr148737/A.java b/tests/bugs153/pr148737/A.java new file mode 100644 index 000000000..9c9360b51 --- /dev/null +++ b/tests/bugs153/pr148737/A.java @@ -0,0 +1,19 @@ +public abstract class A { + public A() { } + public void setUniqueID(Object o) {} +} + +class B extends A { + public B() {} +} + +class D { + public void method() { + B b = new B(); + b.setUniqueID(null); + } +} + +aspect TestAspect { + before(): call(public void *.*()) { } +} diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java index 8899c4581..2fdfb4664 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java @@ -20,6 +20,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");} + public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");} + ///////////////////////////////////////// public static Test suite() { return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class); diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml index 45371bed1..ae3f14d87 100644 --- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml +++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml @@ -14,4 +14,10 @@ + + + + + + \ No newline at end of file