changeset 350:886414736595

Removed uses of synchronization on Boolean object.
author Adam Domurad <adomurad@redhat.com>
date Tue, 22 May 2012 12:11:10 -0400
parents 08121ef055a2
children 418012023ad5
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	Tue May 22 17:37:25 2012 +0200
+++ b/plugin/icedteanp/java/sun/applet/PluginStreamHandler.java	Tue May 22 12:11:10 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