Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2009-09-22 20:48:54 +0000
committerspingel2009-09-22 20:48:54 +0000
commit04d122a4262753997bb1f66e2b488572bdcf1bda (patch)
treefbd62b313c6d25e60d194e61cf6bd33a2a9e8f18 /org.eclipse.mylyn.tasks.core
parentf0af03ef3f0c8436f4141347002770980f917a06 (diff)
downloadorg.eclipse.mylyn.tasks-04d122a4262753997bb1f66e2b488572bdcf1bda.tar.gz
org.eclipse.mylyn.tasks-04d122a4262753997bb1f66e2b488572bdcf1bda.tar.xz
org.eclipse.mylyn.tasks-04d122a4262753997bb1f66e2b488572bdcf1bda.zip
RESOLVED - bug 290183: task repository is not removed after URL is refactored
https://bugs.eclipse.org/bugs/show_bug.cgi?id=290183
Diffstat (limited to 'org.eclipse.mylyn.tasks.core')
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java14
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java2
2 files changed, 12 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
index b3fb2dc3c..19258768d 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/TaskRepositoryManager.java
@@ -131,14 +131,18 @@ public class TaskRepositoryManager implements IRepositoryManager {
}
}
+ @Deprecated
public void removeRepository(final TaskRepository repository, String repositoryFilePath) {
+ removeRepository(repository);
+ }
+
+ public void removeRepository(final TaskRepository repository) {
Set<TaskRepository> repositories = repositoryMap.get(repository.getConnectorKind());
if (repositories != null) {
repository.flushAuthenticationCredentials();
repositories.remove(repository);
}
repository.removeChangeListener(PROPERTY_CHANGE_LISTENER);
- saveRepositories(repositoryFilePath);
for (final IRepositoryListener listener : listeners) {
SafeRunner.run(new ISafeRunnable() {
public void handleException(Throwable e) {
@@ -343,13 +347,17 @@ public class TaskRepositoryManager implements IRepositoryManager {
return true;
}
+ @Deprecated
+ public void clearRepositories(String repositoriesFilePath) {
+ clearRepositories();
+ }
+
/**
* For testing.
*/
- public void clearRepositories(String repositoriesFilePath) {
+ public void clearRepositories() {
repositoryMap.clear();
orphanedRepositories.clear();
- saveRepositories(repositoriesFilePath);
}
public void notifyRepositorySettingsChanged(final TaskRepository repository) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
index ab2a04bd7..d1c7f535a 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
@@ -669,7 +669,7 @@ public final class TaskRepository extends PlatformObject {
@Override
public int hashCode() {
- return getRepositoryUrl().hashCode() * 31 + getConnectorKind().hashCode();
+ return getConnectorKind().hashCode();
}
public boolean hasProperty(String name) {

Back to the top