diff options
author | DJ Houghton | 2010-10-26 15:38:21 +0000 |
---|---|---|
committer | DJ Houghton | 2010-10-26 15:38:21 +0000 |
commit | 3859e53559d0278dd6a2bb60188c5dc8a5149a7e (patch) | |
tree | 091c8ae4bb23369133e6d220e2c05c3245c2fa9b /bundles/org.eclipse.equinox.p2.tests/src/org/eclipse | |
parent | 7aab03dfe6ceb68f1cf3af287e3b78c44f9f8861 (diff) | |
download | rt.equinox.p2-3859e53559d0278dd6a2bb60188c5dc8a5149a7e.tar.gz rt.equinox.p2-3859e53559d0278dd6a2bb60188c5dc8a5149a7e.tar.xz rt.equinox.p2-3859e53559d0278dd6a2bb60188c5dc8a5149a7e.zip |
Bug 328712 - Remove new error in p2 testsv20101026-1730
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests/src/org/eclipse')
2 files changed, 4 insertions, 12 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java index ecfa97bf6..ecb22d5be 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/AllOrbit.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. All rights reserved. This + * Copyright (c) 2008, 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 http://www.eclipse.org/legal/epl-v10.html @@ -8,12 +8,11 @@ ******************************************************************************/ package org.eclipse.equinox.p2.tests.planner; -import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest; - import java.util.ArrayList; import java.util.Iterator; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest; import org.eclipse.equinox.p2.engine.*; import org.eclipse.equinox.p2.metadata.IInstallableUnit; import org.eclipse.equinox.p2.planner.IPlanner; @@ -58,13 +57,11 @@ public class AllOrbit extends AbstractProvisioningTest { ProfileChangeRequest req1 = new ProfileChangeRequest(profile1); IQueryResult allIUs = repo.query(QueryUtil.createIUAnyQuery(), null); ArrayList toInstall = new ArrayList(); - int removed = 0; for (Iterator iterator = allIUs.iterator(); iterator.hasNext();) { IInstallableUnit toAdd = (IInstallableUnit) iterator.next(); if (!toAdd.getId().equals("com.ibm.icu")) { toInstall.add(toAdd); - } else - removed++; + } } req1.addInstallableUnits((IInstallableUnit[]) toInstall.toArray(new IInstallableUnit[toInstall.size()])); @@ -78,14 +75,12 @@ public class AllOrbit extends AbstractProvisioningTest { ProfileChangeRequest req1 = new ProfileChangeRequest(profile1); IQueryResult allIUs = repo.query(QueryUtil.createIUAnyQuery(), null); ArrayList toInstall = new ArrayList(); - int removed = 0; for (Iterator iterator = allIUs.iterator(); iterator.hasNext();) { IInstallableUnit toAdd = (IInstallableUnit) iterator.next(); if (!toAdd.getId().equals("com.ibm.icu")) { toInstall.add(toAdd); req1.setInstallableUnitInclusionRules(toAdd, ProfileInclusionRules.createOptionalInclusionRule(toAdd)); - } else - removed++; + } } req1.addInstallableUnits((IInstallableUnit[]) toInstall.toArray(new IInstallableUnit[toInstall.size()])); diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java index 4e51bc357..7d5babb26 100644 --- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java +++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/planner/Bug302580.java @@ -47,10 +47,8 @@ public class Bug302580 extends AbstractPlannerTest { Operand ops[] = plan.getOperands(); String message = "The plan:\n"; - int iusCounter = 0; for (int i = 0; i < ops.length; i++) { if (ops[i] instanceof InstallableUnitOperand) { - iusCounter++; InstallableUnitOperand iuo = (InstallableUnitOperand) ops[i]; if (iuo.first() == null) { @@ -68,7 +66,6 @@ public class Bug302580 extends AbstractPlannerTest { for (int i = 0; i < ops.length; i++) { if (ops[i] instanceof InstallableUnitOperand) { - iusCounter++; InstallableUnitOperand iuo = (InstallableUnitOperand) ops[i]; if (iuo.second() == null) { |