Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java
index 9831a76bd..cf2bf5af6 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/ORTesting.java
@@ -1,19 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2010 Sonatype, Inc.
+ * Copyright (c) 2010, 2017 Sonatype, Inc. 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
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
package org.eclipse.equinox.p2.tests.planner;
-import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
-
import java.util.ArrayList;
import java.util.Collection;
+import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProvisioningPlan;
import org.eclipse.equinox.p2.metadata.*;
@@ -27,14 +26,14 @@ public class ORTesting extends AbstractProvisioningTest {
public void testOr() {
String orExpression = "providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.mylyn34' || pc.name == 'org.eclipse.mylyn35'))";
IExpression expr = ExpressionUtil.parse(orExpression);
- IMatchExpression matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
+ IMatchExpression<IInstallableUnit> matchExpression = ExpressionUtil.getFactory().matchExpression(expr);
IRequirement orRequirement = MetadataFactory.createRequirement(matchExpression, null, 0, 1, true);
InstallableUnitDescription iudA = new MetadataFactory.InstallableUnitDescription();
iudA.setId("A");
iudA.setVersion(Version.parseVersion("1.0.0"));
iudA.setCapabilities(new IProvidedCapability[] {MetadataFactory.createProvidedCapability("org.eclipse.equinox.p2.iu", "A", Version.parseVersion("1.0.0"))});
- Collection reqs = new ArrayList();
+ Collection<IRequirement> reqs = new ArrayList<>();
reqs.add(orRequirement);
iudA.addRequirements(reqs);

Back to the top