--- a/jdk/src/solaris/classes/sun/awt/X11/XWindow.java Mon Apr 28 11:03:52 2014 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindow.java Mon Apr 28 19:05:49 2014 -0700
@@ -59,7 +59,7 @@
static int lastX = 0, lastY = 0;
static long lastTime = 0;
static long lastButton = 0;
- static WeakReference lastWindowRef = null;
+ static WeakReference<XWindow> lastWindowRef = null;
static int clickCount = 0;
// used to check if we need to re-create surfaceData.
@@ -692,7 +692,7 @@
if (type == XConstants.ButtonPress) {
//Allow this mouse button to generate CLICK event on next ButtonRelease
mouseButtonClickAllowed |= XlibUtil.getButtonMask(lbutton);
- XWindow lastWindow = (lastWindowRef != null) ? ((XWindow)lastWindowRef.get()):(null);
+ XWindow lastWindow = (lastWindowRef != null) ? (lastWindowRef.get()):(null);
/*
multiclick checking
*/
@@ -705,7 +705,7 @@
clickCount++;
} else {
clickCount = 1;
- lastWindowRef = new WeakReference(this);
+ lastWindowRef = new WeakReference<>(this);
lastButton = lbutton;
lastX = x;
lastY = y;
@@ -820,7 +820,7 @@
*/
int x = xme.get_x();
int y = xme.get_y();
- XWindow lastWindow = (lastWindowRef != null) ? ((XWindow)lastWindowRef.get()):(null);
+ XWindow lastWindow = (lastWindowRef != null) ? (lastWindowRef.get()):(null);
if (!(lastWindow == this &&
(xme.get_time() - lastTime) < XToolkit.getMultiClickTime() &&