changeset 291:203e1b4e5c23

Removed synchronization on Boolean when shutting down.
author Adam Domurad <adomurad@redhat.com>
date Tue, 22 May 2012 12:13:03 -0400
parents 4672053d61e0
children 44e61a76e4c4
files plugin/icedteanp/java/sun/applet/PluginStreamHandler.java
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java	Mon Apr 02 11:28:21 2012 -0400
+++ b/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java	Tue May 22 12:13:03 2012 -0400
@@ -59,7 +59,7 @@
     private JavaConsole console = new JavaConsole();
 
     private PluginMessageConsumer consumer;
-    private Boolean shuttingDown = false;
+    private volatile boolean shuttingDown = false;
 
 
     public PluginStreamHandler(InputStream inputstream, OutputStream outputstream)
@@ -322,9 +322,7 @@
             PluginDebug.debug("  PIPE: appletviewer read: ", message);
 
             if (message == null || message.equals("shutdown")) {
-                synchronized (shuttingDown) {
-                    shuttingDown = true;
-                }
+                shuttingDown = true;
                 try {
                     // Close input/output channels to plugin.
                     pluginInputReader.close();
@@ -362,10 +360,8 @@
             } catch (IOException e) {
                 // if we are shutting down, ignore write failures as 
                 // pipe may have closed
-                synchronized (shuttingDown) {
-                    if (!shuttingDown) {
-                        e.printStackTrace();
-                    }
+                if (!shuttingDown) {
+                    e.printStackTrace();
                 }
 
                 // either ways, if the pipe is broken, there is nothing