Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-09-17 22:51:54 +0000
committerspingel2009-09-17 22:51:54 +0000
commit3f0ba86951e1881f5fdf7656ca660bdd19278499 (patch)
tree2e1e6acf27ad02d9d89af2ede1f17ff511c9cdce /org.eclipse.mylyn.tasks.core
parent9c2279b94e0fc8ebfeb7d553fe9672633dc7aa50 (diff)
downloadorg.eclipse.mylyn.tasks-3f0ba86951e1881f5fdf7656ca660bdd19278499.tar.gz
org.eclipse.mylyn.tasks-3f0ba86951e1881f5fdf7656ca660bdd19278499.tar.xz
org.eclipse.mylyn.tasks-3f0ba86951e1881f5fdf7656ca660bdd19278499.zip
NEW - bug 238043: SynchronizationSession.getStaleTasks() should return empty set
https://bugs.eclipse.org/bugs/show_bug.cgi?id=238043
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java7
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java8
2 files changed, 9 insertions, 6 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java
index feeb2164b..822127717 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizationSession.java
@@ -11,6 +11,7 @@
package org.eclipse.mylyn.internal.tasks.core.sync;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
@@ -64,7 +65,11 @@ public class SynchronizationSession implements ISynchronizationSession {
}
public Set<ITask> getStaleTasks() {
- return staleTasks;
+ if (staleTasks == null) {
+ return Collections.emptySet();
+ } else {
+ return staleTasks;
+ }
}
public IStatus getStatus() {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
index 11d531ca6..7827423c9 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/sync/SynchronizeQueriesJob.java
@@ -208,11 +208,9 @@ public class SynchronizeQueriesJob extends SynchronizationJob {
}
Set<ITask> tasksToBeSynchronized = new HashSet<ITask>();
- if (session.getStaleTasks() != null) {
- for (ITask task : session.getStaleTasks()) {
- tasksToBeSynchronized.add(task);
- ((AbstractTask) task).setSynchronizing(true);
- }
+ for (ITask task : session.getStaleTasks()) {
+ tasksToBeSynchronized.add(task);
+ ((AbstractTask) task).setSynchronizing(true);
}
// synchronize tasks that were marked by the connector

Back to the top