Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-06-07 13:45:17 +0000
committerMichael Valenta2007-06-07 13:45:17 +0000
commitc7cacc02ef37c5845538d5fc84e624b5413c355e (patch)
treedc7fe16bac1af4c7c7fc1a7e78cf83106bc96de5 /bundles
parent4b84426ce64ca1b325d455f3c762f78f8b56623d (diff)
downloadeclipse.platform.team-c7cacc02ef37c5845538d5fc84e624b5413c355e.tar.gz
eclipse.platform.team-c7cacc02ef37c5845538d5fc84e624b5413c355e.tar.xz
eclipse.platform.team-c7cacc02ef37c5845538d5fc84e624b5413c355e.zip
Bug 191342 Checkout operations can add null elements to working set
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
index 7a876f33c..8847c0eab 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
@@ -519,9 +519,9 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
} else {
//don't overwrite the old elements
IAdaptable[] tempElements = oldSet.getElements();
- IAdaptable[] finalElementList = new IAdaptable[tempElements.length + projects.length];
- System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
IAdaptable[] adaptedProjects = oldSet.adaptElements(projects);
+ IAdaptable[] finalElementList = new IAdaptable[tempElements.length + adaptedProjects.length];
+ System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length);
oldSet.setElements(finalElementList);
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
index ed211cbf1..6e4202bb3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
@@ -74,9 +74,9 @@ public class ImportProjectSetOperation extends TeamOperation {
} else {
//don't overwrite the old elements
IAdaptable[] tempElements = oldSet.getElements();
- IAdaptable[] finalElementList = new IAdaptable[tempElements.length + projects.length];
- System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
IAdaptable[] adaptedProjects = oldSet.adaptElements(projects);
+ IAdaptable[] finalElementList = new IAdaptable[tempElements.length + adaptedProjects.length];
+ System.arraycopy(tempElements, 0, finalElementList, 0, tempElements.length);
System.arraycopy(adaptedProjects, 0,finalElementList, tempElements.length, adaptedProjects.length);
oldSet.setElements(finalElementList);
}

Back to the top