]> source.dussan.org Git - aspectj.git/commitdiff
more tests for 119570 and a fix for a silly warning that comes out.
authoraclement <aclement>
Mon, 12 Dec 2005 11:57:42 +0000 (11:57 +0000)
committeraclement <aclement>
Mon, 12 Dec 2005 11:57:42 +0000 (11:57 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java
tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java

index d33fa0ff47dce6709d6c555a31a2cb1f5ce8e08d..02b2fe6b65a13a3a3ebbc051b084053054d3161b 100644 (file)
@@ -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,
index 30ee4e15ec1997717a1fbef580b595c1ad9bfeb4..e45ded8a9ec97dd9de9f51f6b1a1eb3c8285d2c4 100644 (file)
@@ -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) {
index ddb6d29b2cedc41cbd8b254f06c1c20fcdb7978b..b8e1c69bfbaa55bc48ddb7887c778ef30870bb2c 100644 (file)
@@ -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 {