Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTodor Boev2017-12-11 12:40:13 +0000
committerAlexander Kurtakov2017-12-12 14:59:14 +0000
commitcf04c14fb70f9579577a5dcd3df5a71366cbeb97 (patch)
treef3674511c107a32c0d69c9b46b35eeb7a61303d6 /bundles/org.eclipse.equinox.p2.reconciler.dropins
parentbca37abc53dfd293c1b750c5c9844f7cd905ddf8 (diff)
downloadrt.equinox.p2-cf04c14fb70f9579577a5dcd3df5a71366cbeb97.tar.gz
rt.equinox.p2-cf04c14fb70f9579577a5dcd3df5a71366cbeb97.tar.xz
rt.equinox.p2-cf04c14fb70f9579577a5dcd3df5a71366cbeb97.zip
Bug 528408 - Extract the IRequirement impl from RequiredCapabilityI20171214-0120I20171213-2000I20171212-2000
- Fix p2 codebase to use MetadataFactory instead of new RequiredCapabiilty - Work around the implicit restriction that IRequiredCapability must always have maxCard > 1. This is due to the serialization format that does not support maxCard == 0 since it only has optional and multiple flags. Change-Id: Ia8f2c9abd4aee553020018032a22784f1af3b3ba Signed-off-by: Todor Boev <rinsvind@gmail.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.reconciler.dropins')
-rw-r--r--bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
index f8885db4a..b3dd86965 100644
--- a/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
+++ b/bundles/org.eclipse.equinox.p2.reconciler.dropins/src/org/eclipse/equinox/internal/p2/reconciler/dropins/ProfileSynchronizer.java
@@ -19,7 +19,6 @@ import org.eclipse.core.runtime.*;
import org.eclipse.equinox.internal.p2.core.helpers.*;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.internal.p2.extensionlocation.Constants;
-import org.eclipse.equinox.internal.p2.metadata.RequiredCapability;
import org.eclipse.equinox.internal.provisional.configurator.Configurator;
import org.eclipse.equinox.internal.provisional.p2.directorywatcher.RepositoryListener;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
@@ -131,7 +130,7 @@ public class ProfileSynchronizer {
if (!request.getRemovals().isEmpty()) {
Collection<IRequirement> requirements = new ArrayList<>();
for (IInstallableUnit unit : request.getRemovals()) {
- RequiredCapability req = new RequiredCapability(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false, null);
+ IRequirement req = MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, unit.getId(), new VersionRange(unit.getVersion(), true, unit.getVersion(), true), null, 0, 0, false);
requirements.add(req);
}
request.addExtraRequirements(requirements);

Back to the top