diff options
author | Adam Domurad <[email protected]> | 2012-05-25 11:44:13 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2012-05-25 11:44:13 -0400 |
commit | 1705caf0db175cb9537313e5c1d9df14186f5bea (patch) | |
tree | 53e206445b682f387d27f3ba762eb70899caefa3 /plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | |
parent | ef79a2eab042f66aa10a2356d9a6f80f5b8d544f (diff) |
Changed for-loops over iterators and indices to for-each loops if they
were sufficient and clearer.
Diffstat (limited to 'plugin/icedteanp/java/sun/applet/PluginAppletViewer.java')
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index 6f4f2eb..35997bb 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -237,27 +237,27 @@ class PluginAppletPanelFactory { // ","-separated list. No error-checking will be done on the list. String[] events = eventList.split(","); - for (int i = 0; i < events.length; i++) { - PluginDebug.debug("Adding event to queue: ", events[i]); - if (events[i].equals("dispose")) + for (String event : events) { + PluginDebug.debug("Adding event to queue: ", event); + if ("dispose".equals(event)) panel.sendEvent(AppletPanel.APPLET_DISPOSE); - else if (events[i].equals("load")) + else if ("load".equals(event)) panel.sendEvent(AppletPanel.APPLET_LOAD); - else if (events[i].equals("init")) + else if ("init".equals(event)) panel.sendEvent(AppletPanel.APPLET_INIT); - else if (events[i].equals("start")) + else if ("start".equals(event)) panel.sendEvent(AppletPanel.APPLET_START); - else if (events[i].equals("stop")) + else if ("stop".equals(event)) panel.sendEvent(AppletPanel.APPLET_STOP); - else if (events[i].equals("destroy")) + else if ("destroy".equals(event)) panel.sendEvent(AppletPanel.APPLET_DESTROY); - else if (events[i].equals("quit")) + else if ("quit".equals(event)) panel.sendEvent(AppletPanel.APPLET_QUIT); - else if (events[i].equals("error")) + else if ("error".equals(event)) panel.sendEvent(AppletPanel.APPLET_ERROR); else // non-fatal error if we get an unrecognized event - PluginDebug.debug("Unrecognized event name: ", events[i]); + PluginDebug.debug("Unrecognized event name: ", event); } while (!panel.emptyEventQueue()) |