diff options
Diffstat (limited to 'plugin/icedteanp/java/sun')
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java index bd3637f..d863f16 100644 --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java @@ -356,7 +356,8 @@ public class PluginAppletViewer extends XEmbeddedFrame public static final int APPLET_TIMEOUT = 180000; - private static Long requestIdentityCounter = 0L; + private static final Object requestMutex = new Object(); + private static long requestIdentityCounter = 0L; private Image bufFrameImg; private Graphics bufFrameImgGraphics; @@ -990,11 +991,11 @@ public class PluginAppletViewer extends XEmbeddedFrame * * @return A unique Long identifier for the request */ - private static Long getRequestIdentifier() { - synchronized (requestIdentityCounter) { - - if (requestIdentityCounter == Long.MAX_VALUE) + private static long getRequestIdentifier() { + synchronized(requestMutex) { + if (requestIdentityCounter == Long.MAX_VALUE) { requestIdentityCounter = 0L; + } return requestIdentityCounter++; } |