Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-02-24 00:41:14 +0000
committerspingel2010-02-24 00:41:14 +0000
commitbf030532b81503350060591036c2528791a6f221 (patch)
tree23834b82257824605f0d4f087ce370fbdfbc070c
parent3a41c2baafce9e65dc28e0fb10d3bbb3df4c6bbb (diff)
downloadorg.eclipse.mylyn.tasks-bf030532b81503350060591036c2528791a6f221.tar.gz
org.eclipse.mylyn.tasks-bf030532b81503350060591036c2528791a6f221.tar.xz
org.eclipse.mylyn.tasks-bf030532b81503350060591036c2528791a6f221.zip
bug 303397: safe-guard against multiple extensions that specify the same connector kindR_3_3_2_e_3_4R_3_3_2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303397
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
index 0ed5ca87b..19425216c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
@@ -290,7 +290,7 @@ public class TasksUiExtensionReader {
Map<String, List<ConnectorDescriptor>> descriptorByConnectorKind = new LinkedHashMap<String, List<ConnectorDescriptor>>();
for (ConnectorDescriptor descriptor : descriptors) {
IStatus status = descriptor.createConnector();
- if (status.isOK()) {
+ if (status.isOK() && descriptor.repositoryConnector != null) {
add(descriptorByConnectorKind, descriptor.getConnectorKind(), descriptor);
} else {
result.add(status);
@@ -302,13 +302,15 @@ public class TasksUiExtensionReader {
// register connectors
List<AbstractTaskListMigrator> migrators = new ArrayList<AbstractTaskListMigrator>();
for (ConnectorDescriptor descriptor : descriptors) {
- TasksUiPlugin.getRepositoryManager().addRepositoryConnector(descriptor.repositoryConnector);
- if (descriptor.migratorElement != null) {
- IStatus status = descriptor.createMigrator();
- if (status.isOK()) {
- migrators.add(descriptor.migrator);
- } else {
- result.add(status);
+ if (descriptor.repositoryConnector != null) {
+ TasksUiPlugin.getRepositoryManager().addRepositoryConnector(descriptor.repositoryConnector);
+ if (descriptor.migratorElement != null) {
+ IStatus status = descriptor.createMigrator();
+ if (status.isOK() && descriptor.migrator != null) {
+ migrators.add(descriptor.migrator);
+ } else {
+ result.add(status);
+ }
}
}
}

Back to the top