Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-18 05:16:23 -0400
committerLars Vogel2019-06-18 05:16:23 -0400
commitd5d2e9d7beddcef698e9dfd70de89e7d63c89524 (patch)
tree5c8344940169381dd24400dda2f16ea7f6daa99a /tests/org.eclipse.team.tests.core
parent0af9ea510f9c3d39e0ad400aac48d22c54a95784 (diff)
downloadeclipse.platform.team-d5d2e9d7beddcef698e9dfd70de89e7d63c89524.tar.gz
eclipse.platform.team-d5d2e9d7beddcef698e9dfd70de89e7d63c89524.tar.xz
eclipse.platform.team-d5d2e9d7beddcef698e9dfd70de89e7d63c89524.zip
Use addAll, deleteAll instead of looping through a collectionI20190618-1805
Change-Id: If74eec05fb721ceeb1f9f8d7fbac9d68be6e767f Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'tests/org.eclipse.team.tests.core')
-rw-r--r--tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
index f4d01f0b6..b37d930a9 100644
--- a/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
+++ b/tests/org.eclipse.team.tests.core/src/org/eclipse/team/tests/ui/synchronize/ResourceContentTests.java
@@ -14,6 +14,7 @@
package org.eclipse.team.tests.ui.synchronize;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
@@ -101,9 +102,7 @@ public class ResourceContentTests extends TeamTest {
private void assertContentsMatch(IResource[] resources) {
Set paths = getPaths(ResourcesPlugin.getWorkspace().getRoot());
Set<Object> resourceSet = new HashSet<>();
- for (IResource resource : resources) {
- resourceSet.add(resource);
- }
+ Collections.addAll(resourceSet, resources);
for (Iterator iterator = paths.iterator(); iterator.hasNext();) {
TreePath path = (TreePath) iterator.next();
Object o = path.getLastSegment();

Back to the top