Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2014-04-10 04:17:41 -0400
committerTomasz Zarna2014-04-14 18:05:52 -0400
commitb024cac5adf1d5db280988b77e9d5af082d931b2 (patch)
treee6dc8b67244f413931592de26452ad48ac5dbbdd /org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal
parent01dc33247e651c482717ab014f629f0c330b374e (diff)
downloadorg.eclipse.mylyn.tasks-b024cac5adf1d5db280988b77e9d5af082d931b2.tar.gz
org.eclipse.mylyn.tasks-b024cac5adf1d5db280988b77e9d5af082d931b2.tar.xz
org.eclipse.mylyn.tasks-b024cac5adf1d5db280988b77e9d5af082d931b2.zip
fix @SuppressWarnings annotations in KeyringMigrators
Change-Id: Iffadfcae47f30893d1ee4b5cf5d333361b8c93bb Signed-off-by: Tomasz Zarna <tomasz.zarna@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/util/KeyringMigrator.java9
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java3
2 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/KeyringMigrator.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/KeyringMigrator.java
index 5ccd8765e..01ab29314 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/KeyringMigrator.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/KeyringMigrator.java
@@ -53,7 +53,6 @@ public abstract class KeyringMigrator<T> {
}
}
- @SuppressWarnings({ "unchecked", "deprecation" })
protected void migrateCredentials(T location) {
try {
Map<String, String> properties = getAuthorizationInfo(getUrl(location));
@@ -65,7 +64,13 @@ public abstract class KeyringMigrator<T> {
}
protected Map<String, String> getAuthorizationInfo(String url) throws MalformedURLException {
- return Platform.getAuthorizationInfo(new URL(url), authRealm, authScheme);
+ return getAuthorizationInfo(new URL(url), authRealm, authScheme);
+ }
+
+ @SuppressWarnings({ "deprecation", "unchecked" })
+ protected Map<String, String> getAuthorizationInfo(URL url, String realm, String scheme)
+ throws MalformedURLException {
+ return Platform.getAuthorizationInfo(url, realm, scheme);
}
protected void putProperties(Map<String, String> properties, T location) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java
index a552c4ea4..569496ba8 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/util/TaskRepositoryKeyringMigrator.java
@@ -17,7 +17,6 @@ import java.util.Collection;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
@@ -71,7 +70,7 @@ public class TaskRepositoryKeyringMigrator extends KeyringMigrator<TaskRepositor
try {
return super.getAuthorizationInfo(url);
} catch (MalformedURLException e) {
- return Platform.getAuthorizationInfo(defaultUrl, url, authScheme);
+ return getAuthorizationInfo(defaultUrl, url, authScheme);
}
}

Back to the top