Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-05-12 11:40:40 -0400
committerMichael Keppler2019-05-15 03:24:09 -0400
commita454a1fb68ca07c95cecf84a94de85d78f0921fe (patch)
treed6249a09d5dc65201266488b568942b2d4a73976 /org.eclipse.egit.ui.test/src
parent6997c809ef8f6e89dac065d693185286d0af83f6 (diff)
downloadegit-a454a1fb68ca07c95cecf84a94de85d78f0921fe.tar.gz
egit-a454a1fb68ca07c95cecf84a94de85d78f0921fe.tar.xz
egit-a454a1fb68ca07c95cecf84a94de85d78f0921fe.zip
Use jdk 5 for-each loop
Replace simple uses of Iterator with a corresponding for-loop. Also add missing braces on loops as necessary. Change-Id: I2190569ff0076ca8004d83ec8bda6e6cd57887aa Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'org.eclipse.egit.ui.test/src')
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/RepoRemoteBranchesPage.java4
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java3
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java3
3 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/RepoRemoteBranchesPage.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/RepoRemoteBranchesPage.java
index 35e57beb3..a0c87bdbe 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/RepoRemoteBranchesPage.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/common/RepoRemoteBranchesPage.java
@@ -54,8 +54,8 @@ public class RepoRemoteBranchesPage {
bot.waitUntil(widgetIsEnabled(tree), 60000);
SWTBotTreeItem[] items = tree.getAllItems();
- for (int i = 0; i < items.length; i++) {
- items[i].uncheck();
+ for (SWTBotTreeItem item : items) {
+ item.uncheck();
}
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
index a586299bc..d65c7d503 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
@@ -830,8 +830,7 @@ public class TestUtil {
for (IWorkbenchWindow window : windows) {
IWorkbenchPage workbenchPage = window.getActivePage();
IViewReference[] views = workbenchPage.getViewReferences();
- for (int i = 0; i < views.length; i++) {
- IViewReference view = views[i];
+ for (IViewReference view : views) {
if (viewId.equals(view.getId())) {
workbenchPage.hideView(view);
}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
index 4229466dd..54ae2f48a 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java
@@ -337,8 +337,7 @@ public class CompareActionsTest extends LocalRepositoryTestCase {
private void closeFirstEmptySynchronizeDialog() {
// Do not use bot.shell(String) : we don't want to fail if not present.
SWTBotShell[] shells = bot.shells();
- for (int i = 0; i < shells.length; i++) {
- SWTBotShell shell = shells[i];
+ for (SWTBotShell shell : shells) {
if ("Synchronize Complete - Git".equals(shell.getText()))
shell.close();
}

Back to the top