Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-02-22 20:10:37 +0000
committerDJ Houghton2010-02-22 20:10:37 +0000
commit15aa27467f64b7e9c70687cc58bf17b31c766160 (patch)
tree5fee81e8de249653d34efd3cb66bb2301d5f5248 /bundles/org.eclipse.equinox.p2.repository.tools
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.repository.tools')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java4
3 files changed, 7 insertions, 10 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
index 9f5665b82..e70468460 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/MirrorApplication.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -241,7 +241,7 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
private void mirrorMetadata(IQueryable<IInstallableUnit> slice, IProgressMonitor monitor) {
IQueryResult<IInstallableUnit> allIUs = slice.query(InstallableUnitQuery.ANY, monitor);
- destinationMetadataRepository.addInstallableUnits(allIUs.toArray(IInstallableUnit.class));
+ destinationMetadataRepository.addInstallableUnits(allIUs.toSet());
}
/*
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
index cbf596f07..ef3b8b842 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src/org/eclipse/equinox/p2/internal/repository/tools/Repo2Runnable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009-2010 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -11,10 +11,6 @@
*******************************************************************************/
package org.eclipse.equinox.p2.internal.repository.tools;
-import org.eclipse.equinox.internal.p2.engine.InstallableUnitOperand;
-
-import org.eclipse.equinox.p2.planner.IPlanner;
-
import java.net.URISyntaxException;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -30,6 +26,7 @@ import org.eclipse.equinox.p2.engine.spi.ProvisioningAction;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.metadata.query.InstallableUnitQuery;
+import org.eclipse.equinox.p2.planner.IPlanner;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRequest;
@@ -193,7 +190,7 @@ public class Repo2Runnable extends AbstractApplication implements IApplication {
// publishing the metadata is optional
if (destinationMetadataRepository == null)
return;
- destinationMetadataRepository.addInstallableUnits(processedIUs.toArray(new IInstallableUnit[processedIUs.size()]));
+ destinationMetadataRepository.addInstallableUnits(processedIUs);
}
/*
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
index 531134c24..566e522a1 100644
--- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
+++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -103,7 +103,7 @@ public class RemoveIUTask extends AbstractRepositoryTask {
}
if (toRemove.size() > 0) {
- repository.removeInstallableUnits(toRemove.toArray(new IInstallableUnit[toRemove.size()]), null);
+ repository.removeInstallableUnits(toRemove);
}
} catch (ProvisionException e) {
throw new BuildException(e);

Back to the top