aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp/java/sun/applet
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/icedteanp/java/sun/applet')
-rw-r--r--plugin/icedteanp/java/sun/applet/JavaConsole.java4
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java4
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java22
3 files changed, 14 insertions, 16 deletions
diff --git a/plugin/icedteanp/java/sun/applet/JavaConsole.java b/plugin/icedteanp/java/sun/applet/JavaConsole.java
index e3af966..9074e1b 100644
--- a/plugin/icedteanp/java/sun/applet/JavaConsole.java
+++ b/plugin/icedteanp/java/sun/applet/JavaConsole.java
@@ -308,8 +308,8 @@ public class JavaConsole {
boolean toShowConsole = false;
- for (int i = 0; i < args.length; i++) {
- if (args[i] == "--show-console") {
+ for (String arg : args) {
+ if ("--show-console".equals(arg)) {
toShowConsole = true;
}
}
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
index 402fa99..733c644 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java
@@ -1295,9 +1295,7 @@ public class PluginAppletSecurityContext {
Permissions grantedPermissions = new Permissions();
- for (int i = 0; i < nsPrivilegeList.length; i++) {
- String privilege = nsPrivilegeList[i];
-
+ for (String privilege : nsPrivilegeList) {
if (privilege.equals("UniversalBrowserRead")) {
BrowserReadPermission bp = new BrowserReadPermission();
grantedPermissions.add(bp);
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())