aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-08-01 03:47:50 -0400
committerAlexander Kurtakov2018-08-01 03:47:50 -0400
commit4eb3a276f4862b1e6ca2e3bedc45c8eb5ebf04ec (patch)
tree904b9c5146411aac3d41ba4a76c2710ca79f34a5
parent4b79bdece8775b22138fcc2c0b2e004a3624ccd5 (diff)
downloadrt.equinox.p2-4eb3a276f4862b1e6ca2e3bedc45c8eb5ebf04ec.tar.gz
rt.equinox.p2-4eb3a276f4862b1e6ca2e3bedc45c8eb5ebf04ec.tar.xz
rt.equinox.p2-4eb3a276f4862b1e6ca2e3bedc45c8eb5ebf04ec.zip
For-each conversion in RemediationOperation.
Change-Id: I81f8ea465e9127a01b248d7ca2d379d392ce93b1 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RemediationOperation.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RemediationOperation.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RemediationOperation.java
index c6770d5d8..5315ba873 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RemediationOperation.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/RemediationOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2017 Red Hat, Inc. and others
+ * Copyright (c) 2013, 2018 Red Hat, 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
@@ -10,7 +10,8 @@
*******************************************************************************/
package org.eclipse.equinox.p2.operations;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
import org.eclipse.core.runtime.*;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.equinox.internal.p2.director.ProfileChangeRequest;
@@ -121,8 +122,7 @@ public class RemediationOperation extends ProfileChangeOperation {
private void determineBestSolutions() {
int beingInstalledWeight = 0;
int installationWeight = 0;
- for (Iterator<Remedy> iterator = remedies.iterator(); iterator.hasNext();) {
- Remedy remedy = iterator.next();
+ for (Remedy remedy : remedies) {
if (remedy.getRequest() != null) {
if (remedy.getBeingInstalledRelaxedWeight() > beingInstalledWeight && remedy.getInstallationRelaxedWeight() == 0) {
bestSolutionChangingTheRequest = remedy;