diff options
author | Carsten Hammer | 2019-05-12 15:40:40 +0000 |
---|---|---|
committer | Michael Keppler | 2019-05-15 07:24:09 +0000 |
commit | a454a1fb68ca07c95cecf84a94de85d78f0921fe (patch) | |
tree | d6249a09d5dc65201266488b568942b2d4a73976 /org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test | |
parent | 6997c809ef8f6e89dac065d693185286d0af83f6 (diff) | |
download | egit-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/org/eclipse/egit/ui/test')
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java | 3 | ||||
-rw-r--r-- | org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/team/actions/CompareActionsTest.java | 3 |
2 files changed, 2 insertions, 4 deletions
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 a586299bc4..d65c7d503d 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 4229466dd1..54ae2f48a6 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(); } |