summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-12 11:57:42 +0000
committeraclement <aclement>2005-12-12 11:57:42 +0000
commitc88fdf16ea84fc920c2f353a52d69e1ce6f73d25 (patch)
tree7d914aa9a441f677c98f667b1913f40b6be87afc
parentc31c8198b4a33f5319bffac5fa5121caec341aff (diff)
downloadaspectj-c88fdf16ea84fc920c2f353a52d69e1ce6f73d25.tar.gz
aspectj-c88fdf16ea84fc920c2f353a52d69e1ce6f73d25.zip
more tests for 119570 and a fix for a silly warning that comes out.
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java5
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java13
-rw-r--r--tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java14
3 files changed, 30 insertions, 2 deletions
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 {