Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2010-02-27 10:28:12 -0500
committerPascal Rapicault2010-02-27 10:28:12 -0500
commit52971abc0896686baa5478f417db31ddc9262366 (patch)
treed0264679981846d69d7088d2177ff53868a3e0ac /bundles/org.eclipse.equinox.p2.directorywatcher
parent7ed3a024eab6d7c67c65b03e3d4a9cfbe130db6c (diff)
downloadrt.equinox.p2-52971abc0896686baa5478f417db31ddc9262366.tar.gz
rt.equinox.p2-52971abc0896686baa5478f417db31ddc9262366.tar.xz
rt.equinox.p2-52971abc0896686baa5478f417db31ddc9262366.zip
Use unmodifiableSet where possible
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher')
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
index d2fc576b8..4997b4692 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
@@ -11,8 +11,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.provisional.p2.directorywatcher;
-import org.eclipse.equinox.p2.query.QueryUtil;
-
import java.io.File;
import java.net.URI;
import java.util.*;
@@ -25,8 +23,7 @@ import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.publisher.*;
import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
import org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction;
-import org.eclipse.equinox.p2.query.IQuery;
-import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.*;
import org.eclipse.equinox.p2.repository.IRepository;
import org.eclipse.equinox.p2.repository.artifact.*;
import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
@@ -220,7 +217,7 @@ public class RepositoryListener extends DirectoryChangeListener {
IQuery<IInstallableUnit> removeQuery = QueryUtil.createMatchQuery( //
"$1.exists(x | properties[$0] == x)", FILE_NAME, removedFiles); //$NON-NLS-1$
IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
- metadataRepository.removeInstallableUnits(toRemove.toSet());
+ metadataRepository.removeInstallableUnits(toRemove.unmodifiableSet());
}
// Then add all the new IUs as well as the new copies of the ones that have changed
Collection<IInstallableUnit> additions = iusToAdd.getIUs(null, null);

Back to the top