Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-12-21 13:17:43 -0500
committermkersten2006-12-21 13:17:43 -0500
commitbc29341c58b473deab215d816d32515bb08b4f20 (patch)
treebe13bf09ae1b65447d64143c0ce14bd436b12bee
parent18367fa0e24781d2ed669b5c11f97aba168e9318 (diff)
downloadorg.eclipse.mylyn.tasks-bc29341c58b473deab215d816d32515bb08b4f20.tar.gz
org.eclipse.mylyn.tasks-bc29341c58b473deab215d816d32515bb08b4f20.tar.xz
org.eclipse.mylyn.tasks-bc29341c58b473deab215d816d32515bb08b4f20.zip
investigate task deactivation failure
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java3
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
index efe9c89ed..1eba6f106 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskList.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
import org.eclipse.mylar.context.core.MylarStatusHandler;
@@ -66,7 +67,7 @@ public class TaskList {
archiveContainer = new TaskArchive(this);
rootCategory = new TaskCategory(LABEL_ROOT, this);
- activeTasks = new ArrayList<ITask>();
+ activeTasks = new CopyOnWriteArrayList<ITask>();
lastTaskNum = 0;
categories.put(archiveContainer.getHandleIdentifier(), archiveContainer);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java
index 52e88b3ed..0587b13e3 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TaskListSaveManager.java
@@ -87,8 +87,7 @@ public class TaskListSaveManager implements ITaskListChangeListener, IBackground
TaskListManager taskListManager = TasksUiPlugin.getTaskListManager();
if(async) {
if (saveContext) {
- for (ITask task : new ArrayList<ITask>(taskListManager.getTaskList()
- .getActiveTasks())) {
+ for (ITask task : taskListManager.getTaskList().getActiveTasks()) {
taskListSaverJob.addTaskContext(task);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
index 16e86b57f..0d69af041 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
@@ -641,7 +641,7 @@ public class TaskListManager implements IPropertyChangeListener {
public void deactivateAllTasks() {
// Make a copy to avoid modification on list being traversed; can result
// in a ConcurrentModificationException
- List<ITask> activeTasks = new ArrayList<ITask>(taskList.getActiveTasks());
+ List<ITask> activeTasks = taskList.getActiveTasks();
for (ITask task : activeTasks) {
deactivateTask(task);
}

Back to the top