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,
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() {
return _instance.errorMessages;
}
+ public static List/*IMessage*/ getWarningMessages() {
+ return _instance.warningMessages;
+ }
+
public static TaskListManager getInstance() {
return _instance;
}
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) {
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 {