Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-27 09:29:48 +0000
committerAlexander Kurtakov2017-09-27 09:29:48 +0000
commit986a7f909b309d7a58cabd503ed21f3155de4478 (patch)
tree12489e92b5dee72897c1e562900759e2b63afd4b /bundles/org.eclipse.swt/Eclipse SWT Browser
parent3815dd0a3ce6505ba8b01f4b46d23f425ba21ed5 (diff)
downloadeclipse.platform.swt-986a7f909b309d7a58cabd503ed21f3155de4478.tar.gz
eclipse.platform.swt-986a7f909b309d7a58cabd503ed21f3155de4478.tar.xz
eclipse.platform.swt-986a7f909b309d7a58cabd503ed21f3155de4478.zip
Bug 525260 - Use foreach to iterate BrowserFuncions
Slightly readable code. Change-Id: I93093d501f6a190ee49b2ecf034fa864166927bc Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Browser')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
index df4bd0c5e2..d04ac5ccaa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/common/org/eclipse/swt/browser/WebBrowser.java
@@ -310,10 +310,7 @@ public void createFunction (BrowserFunction function) {
* remove it so that it is not recreated on subsequent pages
* (the new function overwrites the old one).
*/
- Iterator<Integer> keys = functions.keySet().iterator ();
- while (keys.hasNext ()) {
- Integer key = keys.next ();
- BrowserFunction current = functions.get (key);
+ for (BrowserFunction current : functions.values()) {
if (current.name.equals (function.name)) {
deregisterFunction (current);
break;

Back to the top