--- old/src/solaris/classes/sun/awt/X11/XWindow.java 2014-04-07 13:33:10.883977440 -0700 +++ new/src/solaris/classes/sun/awt/X11/XWindow.java 2014-04-07 13:33:10.533977424 -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 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() &&