Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-02-22 15:10:37 -0500
committerDJ Houghton2010-02-22 15:10:37 -0500
commit15aa27467f64b7e9c70687cc58bf17b31c766160 (patch)
tree5fee81e8de249653d34efd3cb66bb2301d5f5248 /bundles/org.eclipse.equinox.p2.directorywatcher
parent6a9c28a2de409130ba25e58079543f038b632d4b (diff)
downloadrt.equinox.p2-15aa27467f64b7e9c70687cc58bf17b31c766160.tar.gz
rt.equinox.p2-15aa27467f64b7e9c70687cc58bf17b31c766160.tar.xz
rt.equinox.p2-15aa27467f64b7e9c70687cc58bf17b31c766160.zip
Bug 303269 - [repository] The method signatures on IMetadataRepository should take collections
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.java8
1 files changed, 4 insertions, 4 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 3d7c91ba8..035b59409 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2010 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
@@ -212,7 +212,7 @@ public class RepositoryListener extends DirectoryChangeListener {
final Collection<IInstallableUnit> changes = iusToChange.getIUs(null, null);
// first remove any IUs that have changed or that are associated with removed files
if (!removedFiles.isEmpty() || !changes.isEmpty()) {
- metadataRepository.removeInstallableUnits(changes.toArray(new IInstallableUnit[changes.size()]), null);
+ metadataRepository.removeInstallableUnits(changes);
// create a query that will identify all ius related to removed files.
// It's safe to compare a String with a File since the auto coercion will
@@ -220,13 +220,13 @@ public class RepositoryListener extends DirectoryChangeListener {
IMatchQuery<IInstallableUnit> removeQuery = new ExpressionQuery<IInstallableUnit>(IInstallableUnit.class, //
"$1.exists(x | properties[$0] == x)", FILE_NAME, removedFiles); //$NON-NLS-1$
IQueryResult<IInstallableUnit> toRemove = metadataRepository.query(removeQuery, null);
- metadataRepository.removeInstallableUnits(toRemove.toArray(IInstallableUnit.class), null);
+ metadataRepository.removeInstallableUnits(toRemove.toSet());
}
// 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);
additions.addAll(changes);
if (!additions.isEmpty())
- metadataRepository.addInstallableUnits(additions.toArray(new IInstallableUnit[additions.size()]));
+ metadataRepository.addInstallableUnits(additions);
}
/**

Back to the top