Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-01-03 15:12:26 +0000
committerDani Megert2012-01-03 15:12:26 +0000
commit45e2a2fe42c326895aaa0a4323b9650225fa7863 (patch)
treee939e57de69ee275856fde931806ccb81b6fad18
parentc05602c8455d476f9c747b90df88178ea7465908 (diff)
downloadeclipse.platform.team-45e2a2fe42c326895aaa0a4323b9650225fa7863.tar.gz
eclipse.platform.team-45e2a2fe42c326895aaa0a4323b9650225fa7863.tar.xz
eclipse.platform.team-45e2a2fe42c326895aaa0a4323b9650225fa7863.zip
Fixed bug 367749: Error handling in ProjectSetImporter.importProjectSetv20120103-1512
is wrong
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java21
1 files changed, 8 insertions, 13 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
index e3a386cd7..422d9f0fb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -84,9 +84,9 @@ public class ProjectSetImporter {
} else {
UIProjectSetSerializationContext context = new UIProjectSetSerializationContext(shell, filename);
List errors = new ArrayList();
- ArrayList referenceStrings = new ArrayList();
IMemento[] providers = xmlMemento.getChildren("provider"); //$NON-NLS-1$
for (int i = 0; i < providers.length; i++) {
+ ArrayList referenceStrings= new ArrayList();
IMemento[] projects = providers[i].getChildren("project"); //$NON-NLS-1$
for (int j = 0; j < projects.length; j++) {
referenceStrings.add(projects[j].getString("reference")); //$NON-NLS-1$
@@ -110,22 +110,17 @@ public class ProjectSetImporter {
if (allProjects != null)
newProjects.addAll(Arrays.asList(allProjects));
}
- referenceStrings.clear();
} catch (TeamException e) {
errors.add(e);
}
}
if (!errors.isEmpty()) {
- if (errors.size() == 1) {
- throw (TeamException)errors.get(0);
- } else {
- TeamException[] exceptions = (TeamException[]) errors.toArray(new TeamException[errors.size()]);
- IStatus[] status = new IStatus[exceptions.length];
- for (int i = 0; i < exceptions.length; i++) {
- status[i] = exceptions[i].getStatus();
- }
- throw new TeamException(new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ProjectSetImportWizard_1, null));
- }
+ TeamException[] exceptions= (TeamException[])errors.toArray(new TeamException[errors.size()]);
+ IStatus[] status= new IStatus[exceptions.length];
+ for (int i= 0; i < exceptions.length; i++) {
+ status[i]= exceptions[i].getStatus();
+ }
+ throw new TeamException(new MultiStatus(TeamUIPlugin.ID, 0, status, TeamUIMessages.ProjectSetImportWizard_1, null));
}
//try working sets

Back to the top