Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ritchie2017-01-26 14:29:56 -0500
committerGerrit Code Review @ Eclipse.org2017-01-26 20:26:47 -0500
commit298067e6ece519c3684bae659520125152a381d4 (patch)
treef385477fd22d3a75e23f0c031e07a279abc5860f /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal
parent6691e7f132193ac291940f274344c649ac5cfc5f (diff)
downloadorg.eclipse.mylyn.tasks-298067e6ece519c3684bae659520125152a381d4.tar.gz
org.eclipse.mylyn.tasks-298067e6ece519c3684bae659520125152a381d4.tar.xz
org.eclipse.mylyn.tasks-298067e6ece519c3684bae659520125152a381d4.zip
511132: Remove Guava classes from public API
In TaskDataManager and TaskDataState Change-Id: I296513ed090946620695b2af07e872ba315063cb Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511132 Signed-off-by: Colin Ritchie <colin.ritchie@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java6
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java11
2 files changed, 9 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java
index 83f2664b9..ed54c59f3 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataManager.java
@@ -14,8 +14,10 @@ package org.eclipse.mylyn.internal.tasks.core.data;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+import java.util.Collection;
import java.util.Date;
import java.util.List;
+import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.eclipse.core.runtime.Assert;
@@ -45,8 +47,6 @@ import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
-import com.google.common.collect.ListMultimap;
-
/**
* Encapsulates synchronization policy.
*
@@ -600,7 +600,7 @@ public class TaskDataManager implements ITaskDataManager {
});
}
- public void refactorAttributeValue(final ITask itask, final ListMultimap<TaskAttribute, String> newValues)
+ public void refactorAttributeValue(final ITask itask, final Map<TaskAttribute, Collection<String>> newValues)
throws CoreException {
Assert.isTrue(itask instanceof AbstractTask);
final AbstractTask task = (AbstractTask) itask;
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java
index 0e91acdc6..3fbd12e38 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataState.java
@@ -11,7 +11,10 @@
package org.eclipse.mylyn.internal.tasks.core.data;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
+import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.Assert;
@@ -25,8 +28,6 @@ import org.eclipse.mylyn.tasks.core.data.ITaskDataWorkingCopy;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
-import com.google.common.collect.ListMultimap;
-
/**
* @author Rob Elves
* @author Steffen Pingel
@@ -206,19 +207,19 @@ public class TaskDataState implements ITaskDataWorkingCopy {
setRepositoryData(createCopy(oldState.getRepositoryData(), getTaskId()));
}
- public void changeAttributeValues(ListMultimap<TaskAttribute, String> newValues) {
+ public void changeAttributeValues(Map<TaskAttribute, Collection<String>> newValues) {
changeAttributeValues(localTaskData, newValues);
changeAttributeValues(repositoryTaskData, newValues);
changeAttributeValues(editsTaskData, newValues);
changeAttributeValues(lastReadTaskData, newValues);
}
- private void changeAttributeValues(TaskData taskData, ListMultimap<TaskAttribute, String> newValues) {
+ private void changeAttributeValues(TaskData taskData, Map<TaskAttribute, Collection<String>> newValues) {
if (taskData != null) {
for (TaskAttribute key : newValues.keySet()) {
TaskAttribute attribute = taskData.getRoot().getMappedAttribute(key.getPath());
if (attribute != null) {
- attribute.setValues(newValues.get(key));
+ attribute.setValues(new ArrayList<>(newValues.get(key)));
}
}
}

Back to the top