From: aclement Date: Mon, 12 Dec 2005 11:57:42 +0000 (+0000) Subject: more tests for 119570 and a fix for a silly warning that comes out. X-Git-Tag: V1_5_0RC1~32 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c88fdf16ea84fc920c2f353a52d69e1ce6f73d25;p=aspectj.git more tests for 119570 and a fix for a silly warning that comes out. --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java index d33fa0ff4..02b2fe6b6 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java @@ -273,6 +273,11 @@ public class AjProblemReporter extends ProblemReporter { super.disallowedTargetForAnnotation(annotation); } + public void overridesPackageDefaultMethod(MethodBinding localMethod, MethodBinding inheritedMethod) { + if (new String(localMethod.selector).startsWith("ajc$")) return; + super.overridesPackageDefaultMethod(localMethod,inheritedMethod); + } + public void handle( int problemId, String[] problemArguments, diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java index 30ee4e15e..e45ded8a9 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java @@ -604,11 +604,13 @@ public class AjdeInteractionTestbed extends TestCase { private boolean receivedNonIncrementalBuildMessage = false; private boolean receivedBatchBuildMessage = false; private List errorMessages = new ArrayList(); + private List warningMessages = new ArrayList(); public static void reset() { _instance.receivedNonIncrementalBuildMessage=false; _instance.receivedBatchBuildMessage=false; _instance.errorMessages.clear(); + _instance.warningMessages.clear(); } // public static boolean defaultedToBatch() { @@ -627,6 +629,10 @@ public class AjdeInteractionTestbed extends TestCase { return _instance.errorMessages; } + public static List/*IMessage*/ getWarningMessages() { + return _instance.warningMessages; + } + public static TaskListManager getInstance() { return _instance; } @@ -644,12 +650,15 @@ public class AjdeInteractionTestbed extends TestCase { if (message.getKind()==IMessage.ERROR) { errorMessages.add(message); } + if (message.getKind()==IMessage.WARNING) { + warningMessages.add(message); + } log("TaskListManager.addSourcelineTask("+message+")"); } public boolean hasWarning() { - log("TaskListManager.hasWarning() [returning false]"); - return false; + log("TaskListManager.hasWarning() [returning "+(warningMessages.size()==0)+"]"); + return warningMessages.size()==0; } public void addProjectTask(String message, Kind kind) { diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index ddb6d29b2..b8e1c69bf 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -290,6 +290,20 @@ public class MultiProjectIncrementalTests extends AjdeInteractionTestbed { build("PR92837"); } + public void testPr119570() { + initialiseProject("PR119570"); + build("PR119570"); + List l = MyTaskListManager.getWarningMessages(); + assertTrue("Should be no warnings, but got "+l,l.size()==0); + } + + public void testPr119570_2() { + initialiseProject("PR119570_2"); + build("PR119570_2"); + List l = MyTaskListManager.getWarningMessages(); + assertTrue("Should be no warnings, but got "+l,l.size()==0); + } + // If you fiddle with the compiler options - you must manually reset the options at the end of the test public void testPr117209() { try {