changeset 3975:cf7c64f276c6

Back out redundant fix for 6664512.
author Denis Lila <dlila@redhat.com>
date Wed, 11 May 2011 11:08:03 -0400
parents 6a3e0bc5471d
children 49098163596b
files src/share/classes/java/awt/Component.java src/share/classes/java/awt/DefaultKeyboardFocusManager.java src/share/classes/sun/awt/DebugSettings.java src/solaris/classes/sun/awt/X11/XBaseWindow.java src/solaris/classes/sun/awt/X11/XComponentPeer.java src/solaris/classes/sun/awt/X11/XContentWindow.java src/solaris/classes/sun/awt/X11/XDecoratedPeer.java src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java src/solaris/classes/sun/awt/X11/XFramePeer.java src/solaris/classes/sun/awt/X11/XIconWindow.java src/solaris/classes/sun/awt/X11/XInputMethod.java src/solaris/classes/sun/awt/X11/XNETProtocol.java src/solaris/classes/sun/awt/X11/XProtocol.java src/solaris/classes/sun/awt/X11/XToolkit.java src/solaris/classes/sun/awt/X11/XTrayIconPeer.java src/solaris/classes/sun/awt/X11/XWM.java src/solaris/classes/sun/awt/X11/XWindow.java src/solaris/classes/sun/awt/X11/XWindowPeer.java src/solaris/classes/sun/awt/X11InputMethod.java
diffstat 19 files changed, 110 insertions(+), 256 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Component.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/share/classes/java/awt/Component.java	Wed May 11 11:08:03 2011 -0400
@@ -4657,7 +4657,7 @@
         }
 
         if (eventLog.isLoggable(PlatformLogger.FINEST)) {
-            eventLog.finest("{0}", String.valueOf(e));
+            eventLog.finest("{0}", e);
         }
 
         /*
--- a/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/share/classes/java/awt/DefaultKeyboardFocusManager.java	Wed May 11 11:08:03 2011 -0400
@@ -379,8 +379,7 @@
                     // should receive focus first
                     if (focusLog.isLoggable(PlatformLogger.FINER)) {
                         focusLog.finer("tempLost {0}, toFocus {1}",
-                                       String.valueOf(tempLost),
-                                       String.valueOf(toFocus));
+                                       tempLost, toFocus);
                     }
                     if (tempLost != null) {
                         tempLost.requestFocusInWindow(CausedFocusEvent.Cause.ACTIVATION);
@@ -448,8 +447,7 @@
                 Component newFocusOwner = fe.getComponent();
                 if (oldFocusOwner == newFocusOwner) {
                     if (focusLog.isLoggable(PlatformLogger.FINE)) {
-                        focusLog.fine("Skipping {0} because focus owner is the same",
-                                      String.valueOf(e));
+                        focusLog.fine("Skipping {0} because focus owner is the same", e);
                     }
                     // We can't just drop the event - there could be
                     // type-ahead markers associated with it.
@@ -567,8 +565,7 @@
                 Component currentFocusOwner = getGlobalFocusOwner();
                 if (currentFocusOwner == null) {
                     if (focusLog.isLoggable(PlatformLogger.FINE))
-                        focusLog.fine("Skipping {0} because focus owner is null",
-                                      String.valueOf(e));
+                        focusLog.fine("Skipping {0} because focus owner is null", e);
                     break;
                 }
                 // Ignore cases where a Component loses focus to itself.
@@ -576,8 +573,7 @@
                 // FOCUS_GAINED handler will correct it.
                 if (currentFocusOwner == fe.getOppositeComponent()) {
                     if (focusLog.isLoggable(PlatformLogger.FINE))
-                        focusLog.fine("Skipping {0} because current focus owner is equal to opposite",
-                                      String.valueOf(e));
+                        focusLog.fine("Skipping {0} because current focus owner is equal to opposite", e);
                     break;
                 }
 
@@ -647,8 +643,8 @@
                 Window oppositeWindow = we.getOppositeWindow();
                 if (focusLog.isLoggable(PlatformLogger.FINE))
                     focusLog.fine("Active {0}, Current focused {1}, losing focus {2} opposite {3}",
-                                  String.valueOf(activeWindow), String.valueOf(currentFocusedWindow),
-                                  String.valueOf(losingFocusWindow), String.valueOf(oppositeWindow));
+                                  activeWindow, currentFocusedWindow,
+                                  losingFocusWindow, oppositeWindow);
                 if (currentFocusedWindow == null) {
                     break;
                 }
@@ -832,10 +828,7 @@
                         }
                     }
                     if (ke != null) {
-                        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-                            focusLog.finer("Pumping approved event {0}",
-                                           String.valueOf(ke));
-                        }
+                        focusLog.finer("Pumping approved event {0}", ke);
                         enqueuedKeyEvents.removeFirst();
                     }
                 }
@@ -857,7 +850,7 @@
                     Iterator iter = typeAheadMarkers.iterator();
                     while (iter.hasNext()) {
                         TypeAheadMarker marker = (TypeAheadMarker)iter.next();
-                        focusLog.finest("    {0}", String.valueOf(marker));
+                        focusLog.finest("    {0}", marker);
                     }
                 }
             }
@@ -885,10 +878,7 @@
                         // The fix is rolled out.
 
                         if (ke.getWhen() > marker.after) {
-                            if (focusLog.isLoggable(PlatformLogger.FINER)) {
-                                focusLog.finer("Storing event {0} because of marker {1}",
-                                               String.valueOf(ke), String.valueOf(marker));
-                            }
+                            focusLog.finer("Storing event {0} because of marker {1}", ke, marker);
                             enqueuedKeyEvents.addLast(ke);
                             return true;
                         }
@@ -900,10 +890,7 @@
             }
 
             case FocusEvent.FOCUS_GAINED:
-                if (focusLog.isLoggable(PlatformLogger.FINEST)) {
-                    focusLog.finest("Markers before FOCUS_GAINED on {0}",
-                                    String.valueOf(target));
-                }
+                focusLog.finest("Markers before FOCUS_GAINED on {0}", target);
                 dumpMarkers();
                 // Search the marker list for the first marker tied to
                 // the Component which just gained focus. Then remove
@@ -932,10 +919,7 @@
                         }
                     } else {
                         // Exception condition - event without marker
-                        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-                            focusLog.finer("Event without marker {0}",
-                                           String.valueOf(e));
-                        }
+                        focusLog.finer("Event without marker {0}", e);
                     }
                 }
                 focusLog.finest("Markers after FOCUS_GAINED");
@@ -1175,10 +1159,8 @@
             return;
         }
 
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-            focusLog.finer("Enqueue at {0} for {1}",
-                           after, String.valueOf(untilFocused));
-        }
+        focusLog.finer("Enqueue at {0} for {1}",
+                       after, untilFocused);
 
         int insertionIndex = 0,
             i = typeAheadMarkers.size();
@@ -1217,10 +1199,8 @@
             return;
         }
 
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-            focusLog.finer("Dequeue at {0} for {1}",
-                           after, String.valueOf(untilFocused));
-        }
+        focusLog.finer("Dequeue at {0} for {1}",
+                       after, untilFocused);
 
         TypeAheadMarker marker;
         ListIterator iter = typeAheadMarkers.listIterator
--- a/src/share/classes/sun/awt/DebugSettings.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/share/classes/sun/awt/DebugSettings.java	Wed May 11 11:08:03 2011 -0400
@@ -129,7 +129,7 @@
 
         // echo the initial property settings to stdout
         if (log.isLoggable(PlatformLogger.FINE)) {
-            log.fine("DebugSettings:\n{0}" + String.valueOf(this));
+            log.fine("DebugSettings:\n{0}" + this);
         }
     }
 
--- a/src/solaris/classes/sun/awt/X11/XBaseWindow.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XBaseWindow.java	Wed May 11 11:08:03 2011 -0400
@@ -820,9 +820,7 @@
      * The active grab overrides activated automatic grab.
      */
     public boolean grabInput() {
-        if (grabLog.isLoggable(PlatformLogger.FINE)) {
-            grabLog.fine("Grab input on {0}", String.valueOf(this));
-        }
+        grabLog.fine("Grab input on {0}", this);
 
         XToolkit.awtLock();
         try {
@@ -885,9 +883,7 @@
         XToolkit.awtLock();
         try {
             XBaseWindow grabWindow = XAwtState.getGrabWindow();
-            if (grabLog.isLoggable(PlatformLogger.FINE)) {
-                grabLog.fine("UnGrab input on {0}", String.valueOf(grabWindow));
-            }
+            grabLog.fine("UnGrab input on {0}", grabWindow);
             if (grabWindow != null) {
                 grabWindow.ungrabInputImpl();
                 if (!XToolkit.getSunAwtDisableGrab()) {
@@ -940,7 +936,7 @@
             XPropertyCache.clearCache(window, XAtom.get(msg.get_atom()));
         }
         if (eventLog.isLoggable(PlatformLogger.FINER)) {
-            eventLog.finer("{0}", String.valueOf(msg));
+            eventLog.finer("{0}", msg);
         }
     }
 
@@ -1021,9 +1017,7 @@
     }
     public void handleConfigureNotifyEvent(XEvent xev) {
         XConfigureEvent xe = xev.get_xconfigure();
-        if (insLog.isLoggable(PlatformLogger.FINER)) {
-            insLog.finer("Configure, {0}", String.valueOf(xe));
-        }
+        insLog.finer("Configure, {0}", xe);
         x = xe.get_x();
         y = xe.get_y();
         width = xe.get_width();
--- a/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XComponentPeer.java	Wed May 11 11:08:03 2011 -0400
@@ -233,9 +233,7 @@
      * Called when component receives focus
      */
     public void focusGained(FocusEvent e) {
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-            focusLog.fine("{0}", String.valueOf(e));
-        }
+        focusLog.fine("{0}", e);
         bHasFocus = true;
     }
 
@@ -243,10 +241,8 @@
      * Called when component loses focus
      */
     public void focusLost(FocusEvent e) {
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-            focusLog.fine("{0}", String.valueOf(e));
-            bHasFocus = false;
-        }
+        focusLog.fine("{0}", e);
+        bHasFocus = false;
     }
 
     public boolean isFocusable() {
@@ -398,10 +394,7 @@
      * @see java.awt.peer.ComponentPeer
      */
     public void setEnabled(boolean value) {
-        if (enableLog.isLoggable(PlatformLogger.FINE)) {
-            enableLog.fine("{0}ing {1}", (value?"Enabl":"Disabl"),
-                           String.valueOf(this));
-        }
+        enableLog.fine("{0}ing {1}", (value?"Enabl":"Disabl"), this);
         boolean repaintNeeded = (enabled != value);
         enabled = value;
         if (target instanceof Container) {
@@ -1264,10 +1257,7 @@
      * ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify
      */
     protected boolean isEventDisabled(XEvent e) {
-        if (enableLog.isLoggable(PlatformLogger.FINEST)) {
-            enableLog.finest("Component is {1}, checking for disabled event {0}",
-                             String.valueOf(e), (isEnabled()?"enabled":"disable"));
-        }
+        enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable"));
         if (!isEnabled()) {
             switch (e.get_type()) {
               case XConstants.ButtonPress:
@@ -1277,9 +1267,7 @@
               case XConstants.EnterNotify:
               case XConstants.LeaveNotify:
               case XConstants.MotionNotify:
-                  if (enableLog.isLoggable(PlatformLogger.FINER)) {
-                      enableLog.finer("Event {0} is disable", String.valueOf(e));
-                  }
+                  enableLog.finer("Event {0} is disable", e);
                   return true;
             }
         }
--- a/src/solaris/classes/sun/awt/X11/XContentWindow.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XContentWindow.java	Wed May 11 11:08:03 2011 -0400
@@ -116,8 +116,7 @@
                 newBounds.setLocation(-in.left, -in.top);
             }
             if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting content bounds {0}, old bounds {1}",
-                                                                    String.valueOf(newBounds),
-                                                                    String.valueOf(getBounds()));
+                                                                    newBounds, getBounds());
             // Fix for 5023533:
             // Change in the size of the content window means, well, change of the size
             // Change in the location of the content window means change in insets
--- a/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XDecoratedPeer.java	Wed May 11 11:08:03 2011 -0400
@@ -78,7 +78,7 @@
         Rectangle bounds = (Rectangle)params.get(BOUNDS);
         dimensions = new WindowDimensions(bounds, getRealInsets(), false);
         params.put(BOUNDS, dimensions.getClientRect());
-        insLog.fine("Initial dimensions {0}", String.valueOf(dimensions));
+        insLog.fine("Initial dimensions {0}", dimensions);
 
         // Deny default processing of these events on the shell - proxy will take care of
         // them instead
@@ -335,7 +335,7 @@
                 // Check if we have insets provided by the WM
                 Insets correctWM = getWMSetInsets(null);
                 if (correctWM != null) {
-                    insLog.finer("wm-provided insets {0}", String.valueOf(correctWM));
+                    insLog.finer("wm-provided insets {0}", correctWM);
                     // If these insets are equal to our current insets - no actions are necessary
                     Insets dimInsets = dimensions.getInsets();
                     if (correctWM.equals(dimInsets)) {
@@ -349,7 +349,7 @@
                     correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent());
 
                     if (correctWM != null) {
-                        insLog.finer("correctWM {0}", String.valueOf(correctWM));
+                        insLog.finer("correctWM {0}", correctWM);
                     } else {
                         insLog.finer("correctWM insets are not available, waiting for configureNotify");
                     }
@@ -372,7 +372,7 @@
              * initial insets were wrong (most likely they were).
              */
             Insets correction = difference(correctWM, currentInsets);
-            insLog.finest("Corrention {0}", String.valueOf(correction));
+            insLog.finest("Corrention {0}", correction);
             if (!isNull(correction)) {
                 currentInsets = copy(correctWM);
                 applyGuessedInsets();
@@ -456,7 +456,7 @@
         Insets in = copy(getRealInsets());
         in.top += getMenuBarHeight();
         if (insLog.isLoggable(PlatformLogger.FINEST)) {
-            insLog.finest("Get insets returns {0}", String.valueOf(in));
+            insLog.finest("Get insets returns {0}", in);
         }
         return in;
     }
@@ -614,7 +614,7 @@
         }
         if (insLog.isLoggable(PlatformLogger.FINE))
             insLog.fine("For the operation {0} new dimensions are {1}",
-                        operationToString(operation), String.valueOf(dims));
+                        operationToString(operation), dims);
 
         reshape(dims, operation, userReshape);
     }
@@ -644,7 +644,7 @@
     public void handleConfigureNotifyEvent(XEvent xev) {
         assert (SunToolkit.isAWTLockHeldByCurrentThread());
         XConfigureEvent xe = xev.get_xconfigure();
-        insLog.fine("Configure notify {0}", String.valueOf(xe));
+        insLog.fine("Configure notify {0}", xe);
 
         // XXX: should really only consider synthetic events, but
         if (isReparented()) {
@@ -733,8 +733,7 @@
                 case XWM.SAWFISH_WM:
                 {
                     Point xlocation = queryXLocation();
-                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("New X location: {0}",
-                                                                      String.valueOf(xlocation));
+                    if (log.isLoggable(PlatformLogger.FINE)) log.fine("New X location: {0}", xlocation);
                     if (xlocation != null) {
                         newLocation = xlocation;
                     }
@@ -752,8 +751,7 @@
                 true);
 
         insLog.finer("Insets are {0}, new dimensions {1}",
-                     String.valueOf(currentInsets),
-                     String.valueOf(newDimensions));
+                     currentInsets, newDimensions);
 
         checkIfOnNewScreen(newDimensions.getBounds());
 
@@ -916,7 +914,7 @@
                 Point location = target.getLocation();
                 if (insLog.isLoggable(PlatformLogger.FINE))
                     insLog.fine("getLocationOnScreen {0} not reparented: {1} ",
-                                String.valueOf(this), String.valueOf(location));
+                                this, location);
                 return location;
             }
         } finally {
@@ -953,9 +951,7 @@
     }
 
     public void setVisible(boolean vis) {
-        if (log.isLoggable(PlatformLogger.FINER)) {
-          log.finer("Setting {0} to visible {1}", String.valueOf(this), Boolean.valueOf(vis));
-        }
+        log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
         if (vis && !isVisible()) {
             XWM.setShellDecor(this);
             super.setVisible(vis);
@@ -1006,9 +1002,7 @@
     }
 
     private void handleWmTakeFocus(XClientMessageEvent cl) {
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
-            focusLog.fine("WM_TAKE_FOCUS on {0}", String.valueOf(this));
-        }
+        focusLog.fine("WM_TAKE_FOCUS on {0}", this);
         requestWindowFocus(cl.get_data(1), true);
     }
 
--- a/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XDropTargetProtocol.java	Wed May 11 11:08:03 2011 -0400
@@ -117,7 +117,7 @@
         EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel);
 
         if (logger.isLoggable(PlatformLogger.FINEST)) {
-            logger.finest("        entry={0}", String.valueOf(entry));
+            logger.finest("        entry={0}", entry);
         }
         // Window not registered as an embedder for this protocol.
         if (entry == null) {
@@ -138,8 +138,7 @@
         long proxy = entry.getProxy();
 
         if (logger.isLoggable(PlatformLogger.FINEST)) {
-            logger.finest("        proxy={0} toplevel={1}", String.valueOf(proxy),
-                          String.valueOf(toplevel));
+            logger.finest("        proxy={0} toplevel={1}", proxy, toplevel);
         }
         if (proxy == 0) {
             proxy = toplevel;
--- a/src/solaris/classes/sun/awt/X11/XFramePeer.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XFramePeer.java	Wed May 11 11:08:03 2011 -0400
@@ -284,9 +284,7 @@
         super.handlePropertyNotify(xev);
         XPropertyEvent ev = xev.get_xproperty();
 
-        if (log.isLoggable(PlatformLogger.FINER)) {
-            log.finer("Property change {0}", String.valueOf(ev));
-        }
+        log.finer("Property change {0}", ev);
         /*
          * Let's see if this is a window state protocol message, and
          * if it is - decode a new state in terms of java constants.
--- a/src/solaris/classes/sun/awt/X11/XIconWindow.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XIconWindow.java	Wed May 11 11:08:03 2011 -0400
@@ -75,9 +75,7 @@
             XIconSize[] res = new XIconSize[count];
             for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) {
                 res[i] = new XIconSize(sizes_ptr);
-                if (log.isLoggable(PlatformLogger.FINEST)) {
-                    log.finest("sizes_ptr[{1}] = {0}", String.valueOf(res[i]), Integer.valueOf(i));
-                }
+                log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i));
             }
             return res;
         } finally {
@@ -94,9 +92,7 @@
         }
 
         XIconSize[] sizeList = getIconSizes();
-        if (log.isLoggable(PlatformLogger.FINEST)) {
-            log.finest("Icon sizes: {0}", String.valueOf(sizeList));
-        }
+        log.finest("Icon sizes: {0}", sizeList);
         if (sizeList == null) {
             // No icon sizes so we simply fall back to 16x16
             return new Dimension(16, 16);
@@ -448,9 +444,7 @@
             }
             Dimension iconSize = getIconSize(width, height);
             if (iconSize != null) {
-                if (log.isLoggable(PlatformLogger.FINEST)) {
-                    log.finest("Icon size: {0}", String.valueOf(iconSize));
-                }
+                log.finest("Icon size: {0}", iconSize);
                 iconWidth = iconSize.width;
                 iconHeight = iconSize.height;
             } else {
--- a/src/solaris/classes/sun/awt/X11/XInputMethod.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XInputMethod.java	Wed May 11 11:08:03 2011 -0400
@@ -108,10 +108,8 @@
             client = getParent(client);
             peer = (XComponentPeer)XToolkit.targetToPeer(client);
         }
-        if (log.isLoggable(PlatformLogger.FINE)) {
-            log.fine("Peer is {0}, client is {1}",
-                     String.valueOf(peer), String.valueOf(client));
-        }
+        log.fine("Peer is {0}, client is {1}", peer, client);
+
         if (peer != null)
             return peer;
 
--- a/src/solaris/classes/sun/awt/X11/XNETProtocol.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XNETProtocol.java	Wed May 11 11:08:03 2011 -0400
@@ -53,10 +53,7 @@
 
     private void setInitialState(XWindowPeer window, int state) {
         XAtomList old_state = window.getNETWMState();
-        if (log.isLoggable(PlatformLogger.FINE)) {
-          log.fine("Current state of the window {0} is {1}",
-                   String.valueOf(window), String.valueOf(old_state));
-        }
+        log.fine("Current state of the window {0} is {1}", window, old_state);
         if ((state & Frame.MAXIMIZED_VERT) != 0) {
             old_state.add(XA_NET_WM_STATE_MAXIMIZED_VERT);
         } else {
@@ -67,8 +64,7 @@
         } else {
             old_state.remove(XA_NET_WM_STATE_MAXIMIZED_HORZ);
         }
-        log.fine("Setting initial state of the window {0} to {1}",
-                 String.valueOf(window), String.valueOf(old_state));
+        log.fine("Setting initial state of the window {0} to {1}", window, old_state);
         window.setNETWMState(old_state);
     }
 
@@ -183,9 +179,7 @@
             req.set_data(1, state.getAtom());
             // Fix for 6735584: req.data[2] must be set to 0 when only one property is changed
             req.set_data(2, 0);
-            log.fine("Setting _NET_STATE atom {0} on {1} for {2}",
-                     String.valueOf(state), String.valueOf(window),
-                     Boolean.valueOf(isAdd));
+            log.fine("Setting _NET_STATE atom {0} on {1} for {2}", state, window, Boolean.valueOf(isAdd));
             XToolkit.awtLock();
             try {
                 XlibWrapper.XSendEvent(XToolkit.getDisplay(),
@@ -217,15 +211,13 @@
             requestState(window, state, set);
         } else {
             XAtomList net_wm_state = window.getNETWMState();
-            log.finer("Current state on {0} is {1}",
-                      String.valueOf(window), String.valueOf(net_wm_state));
+            log.finer("Current state on {0} is {1}", window, net_wm_state);
             if (!set) {
                 net_wm_state.remove(state);
             } else {
                 net_wm_state.add(state);
             }
-            log.fine("Setting states on {0} to {1}",
-                     String.valueOf(window), String.valueOf(net_wm_state));
+            log.fine("Setting states on {0} to {1}", window, net_wm_state);
             window.setNETWMState(net_wm_state);
         }
         XToolkit.XSync();
--- a/src/solaris/classes/sun/awt/X11/XProtocol.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XProtocol.java	Wed May 11 11:08:03 2011 -0400
@@ -54,8 +54,7 @@
         } finally {
             if (firstCheck) {
                 firstCheck = false;
-                log.fine("{0}:{1} supports {2}", String.valueOf(this),
-                         String.valueOf(listName), String.valueOf(protocols));
+                log.fine("{0}:{1} supports {2}", this, listName, protocols);
             }
         }
     }
--- a/src/solaris/classes/sun/awt/X11/XToolkit.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XToolkit.java	Wed May 11 11:08:03 2011 -0400
@@ -640,7 +640,7 @@
                 }
 
                 if (eventLog.isLoggable(PlatformLogger.FINER)) {
-                    eventLog.finer("{0}", String.valueOf(ev));
+                    eventLog.finer("{0}", ev);
                 }
 
                 // Check if input method consumes the event
@@ -1864,8 +1864,7 @@
                 timeoutTaskLog.finer("XToolkit.schedule(): current time={0}" +
                                      ";  interval={1}" +
                                      ";  task being added={2}" + ";  tasks before addition={3}",
-                                     Long.valueOf(System.currentTimeMillis()), Long.valueOf(interval),
-                                     String.valueOf(task), String.valueOf(timeoutTasks));
+                                     Long.valueOf(System.currentTimeMillis()), Long.valueOf(interval), task, timeoutTasks);
             }
 
             if (timeoutTasks == null) {
@@ -1910,8 +1909,7 @@
     private static void callTimeoutTasks() {
         if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
             timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
-                                 ";  tasks={1}", Long.valueOf(System.currentTimeMillis()),
-                                 String.valueOf(timeoutTasks));
+                                 ";  tasks={1}", Long.valueOf(System.currentTimeMillis()), timeoutTasks);
         }
 
         if (timeoutTasks == null || timeoutTasks.isEmpty()) {
@@ -1929,8 +1927,7 @@
 
                 if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
                     timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
-                                         ";  about to run task={1}", Long.valueOf(currentTime),
-                                         String.valueOf(task));
+                                         ";  about to run task={1}", Long.valueOf(currentTime), task);
                 }
 
                 try {
--- a/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XTrayIconPeer.java	Wed May 11 11:08:03 2011 -0400
@@ -106,11 +106,9 @@
 
                     XConfigureEvent ce = ev.get_xconfigure();
 
-                    if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                        ctrLog.fine("ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
-                                    String.valueOf(XTrayIconPeer.this), ce.get_width(), ce.get_height(),
-                                    ce.get_x(), ce.get_y(), old_x, old_y);
-                    }
+                    ctrLog.fine("ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
+                                XTrayIconPeer.this, ce.get_width(), ce.get_height(),
+                                ce.get_x(), ce.get_y(), old_x, old_y);
 
                     // A workaround for Gnome/Metacity (it doesn't affect the behaviour on KDE).
                     // On Metacity the EmbeddedFrame's parent window bounds are larger
@@ -130,18 +128,15 @@
                         // If both the height and the width differ from the fixed size then WM
                         // must level at least one side to the fixed size. For some reason it may take
                         // a few hops (even after reparenting) and we have to skip the intermediate ones.
-                        if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                            ctrLog.fine("ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
-                                        String.valueOf(XTrayIconPeer.this));
-                        }
+                        ctrLog.fine("ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
+                                    XTrayIconPeer.this);
                         return;
 
                     } else if (ce.get_height() > TRAY_ICON_HEIGHT) {
 
-                        if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                            ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"Y\".",
-                                        String.valueOf(XTrayIconPeer.this));
-                        }
+                        ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"Y\".",
+                                    XTrayIconPeer.this);
+
                         XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), eframeParentID,
                                                       ce.get_x(),
                                                       ce.get_y()+ce.get_height()/2-TRAY_ICON_HEIGHT/2,
@@ -152,10 +147,9 @@
 
                     } else if (ce.get_width() > TRAY_ICON_WIDTH) {
 
-                        if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                            ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"X\".",
-                                        String.valueOf(XTrayIconPeer.this));
-                        }
+                        ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"X\".",
+                                    XTrayIconPeer.this);
+
                         XlibWrapper.XMoveResizeWindow(XToolkit.getDisplay(), eframeParentID,
                                                       ce.get_x()+ce.get_width()/2 - TRAY_ICON_WIDTH/2,
                                                       ce.get_y(),
@@ -171,28 +165,24 @@
 
                         if (ex_height != 0) {
 
-                            if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                                ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".",
-                                            String.valueOf(XTrayIconPeer.this));
-                            }
+                            ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".",
+                                        XTrayIconPeer.this);
+
                             XlibWrapper.XMoveWindow(XToolkit.getDisplay(), eframeParentID,
                                                     ce.get_x(),
                                                     ce.get_y() + ex_height/2 - TRAY_ICON_HEIGHT/2);
 
                         } else if (ex_width != 0) {
 
-                            if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                                ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".",
-                                            String.valueOf(XTrayIconPeer.this));
-                            }
+                            ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".",
+                                        XTrayIconPeer.this);
+
                             XlibWrapper.XMoveWindow(XToolkit.getDisplay(), eframeParentID,
                                                     ce.get_x() + ex_width/2 - TRAY_ICON_WIDTH/2,
                                                     ce.get_y());
                         } else {
-                            if (ctrLog.isLoggable(PlatformLogger.FINE)) {
-                                ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Skipping.",
-                                            String.valueOf(XTrayIconPeer.this));
-                            }
+                            ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Skipping.",
+                                        XTrayIconPeer.this);
                         }
                     }
                     old_x = ce.get_x();
--- a/src/solaris/classes/sun/awt/X11/XWM.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XWM.java	Wed May 11 11:08:03 2011 -0400
@@ -401,9 +401,7 @@
     static boolean isCDE() {
 
         if (!XA_DT_SM_WINDOW_INFO.isInterned()) {
-            if (log.isLoggable(PlatformLogger.FINER)) {
-                log.finer("{0} is not interned", String.valueOf(XA_DT_SM_WINDOW_INFO));
-            }
+            log.finer("{0} is not interned", XA_DT_SM_WINDOW_INFO);
             return false;
         }
 
@@ -434,9 +432,7 @@
 
             /* Now check that this window has _DT_SM_STATE_INFO (ignore contents) */
             if (!XA_DT_SM_STATE_INFO.isInterned()) {
-                if (log.isLoggable(PlatformLogger.FINER)) {
-                    log.finer("{0} is not interned", String.valueOf(XA_DT_SM_STATE_INFO));
-                }
+                log.finer("{0} is not interned", XA_DT_SM_STATE_INFO);
                 return false;
             }
             WindowPropertyGetter getter2 =
@@ -600,9 +596,7 @@
          */
 
         if (!XA_ICEWM_WINOPTHINT.isInterned()) {
-            if (log.isLoggable(PlatformLogger.FINER)) {
-                log.finer("{0} is not interned", String.valueOf(XA_ICEWM_WINOPTHINT));
-            }
+            log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
             return false;
         }
 
@@ -635,10 +629,7 @@
      */
     static boolean isIceWM() {
         if (!XA_ICEWM_WINOPTHINT.isInterned()) {
-            if (log.isLoggable(PlatformLogger.FINER)) {
-                log.finer("{0} is not interned",
-                          String.valueOf(XA_ICEWM_WINOPTHINT));
-            }
+            log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
             return false;
         }
 
@@ -1363,9 +1354,7 @@
         XNETProtocol net_protocol = getWM().getNETProtocol();
         if (net_protocol != null && net_protocol.active()) {
             Insets insets = getInsetsFromProp(window, XA_NET_FRAME_EXTENTS);
-            if (log.isLoggable(PlatformLogger.FINE)) {
-                insLog.fine("_NET_FRAME_EXTENTS: {0}", String.valueOf(insets));
-            }
+            insLog.fine("_NET_FRAME_EXTENTS: {0}", insets);
 
             if (insets != null) {
                 return insets;
@@ -1506,10 +1495,7 @@
          *       [mwm, e!, kwin, fvwm2 ... ]
          */
         Insets correctWM = XWM.getInsetsFromExtents(window);
-        if (log.isLoggable(PlatformLogger.FINER)) {
-            insLog.finer("Got insets from property: {0}",
-                         String.valueOf(correctWM));
-        }
+        insLog.finer("Got insets from property: {0}", correctWM);
 
         if (correctWM == null) {
             correctWM = new Insets(0,0,0,0);
@@ -1570,10 +1556,7 @@
                   }
                   case XWM.OTHER_WM:
                   default: {                /* this is very similar to the E! case above */
-                      if (log.isLoggable(PlatformLogger.FINEST)) {
-                          insLog.finest("Getting correct insets for OTHER_WM/default, parent: {0}",
-                                        String.valueOf(parent));
-                      }
+                      insLog.finest("Getting correct insets for OTHER_WM/default, parent: {0}", parent);
                       syncTopLevelPos(parent, lwinAttr);
                       int status = XlibWrapper.XGetWindowAttributes(XToolkit.getDisplay(),
                                                                     window, lwinAttr.pData);
@@ -1600,11 +1583,8 @@
                           && lwinAttr.get_width()+2*lwinAttr.get_border_width() == pattr.get_width()
                           && lwinAttr.get_height()+2*lwinAttr.get_border_width() == pattr.get_height())
                       {
-                          if (log.isLoggable(PlatformLogger.FINEST)) {
-                              insLog.finest("Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
-                                            String.valueOf(lwinAttr), String.valueOf(pattr),
-                                            String.valueOf(parent), String.valueOf(window));
-                          }
+                          insLog.finest("Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
+                                        lwinAttr, pattr, parent, window);
                           lwinAttr.set_x(pattr.get_x());
                           lwinAttr.set_y(pattr.get_y());
                           lwinAttr.set_border_width(lwinAttr.get_border_width()+pattr.get_border_width());
@@ -1631,11 +1611,8 @@
                        * widths and inner/outer distinction, so for the time
                        * being, just ignore it.
                        */
-                      if (log.isLoggable(PlatformLogger.FINEST)) {
-                          insLog.finest("Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
-                                        String.valueOf(lwinAttr), String.valueOf(pattr),
-                                        String.valueOf(parent), String.valueOf(window));
-                      }
+                      insLog.finest("Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
+                                    lwinAttr, pattr, parent, window);
                       correctWM = new Insets(lwinAttr.get_y() + lwinAttr.get_border_width(),
                                              lwinAttr.get_x() + lwinAttr.get_border_width(),
                                              pattr.get_height() - (lwinAttr.get_y() + lwinAttr.get_height() + 2*lwinAttr.get_border_width()),
--- a/src/solaris/classes/sun/awt/X11/XWindow.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XWindow.java	Wed May 11 11:08:03 2011 -0400
@@ -999,11 +999,8 @@
         Rectangle oldBounds = getBounds();
 
         super.handleConfigureNotifyEvent(xev);
-        if (insLog.isLoggable(PlatformLogger.FINER)) {
-            insLog.finer("Configure, {0}, event disabled: {1}",
-                         String.valueOf(xev.get_xconfigure()),
-                         isEventDisabled(xev));
-        }
+        insLog.finer("Configure, {0}, event disabled: {1}",
+                     xev.get_xconfigure(), isEventDisabled(xev));
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1022,9 +1019,7 @@
 
     public void handleMapNotifyEvent(XEvent xev) {
         super.handleMapNotifyEvent(xev);
-        if (insLog.isLoggable(PlatformLogger.FINE)) {
-            log.fine("Mapped {0}", String.valueOf(this));
-        }
+        log.fine("Mapped {0}", this);
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1340,14 +1335,10 @@
     void updateSizeHints(int x, int y, int width, int height) {
         long flags = XUtilConstants.PSize | (isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition));
         if (!isResizable()) {
-            if (insLog.isLoggable(PlatformLogger.FINER)) {
-                log.finer("Window {0} is not resizable", String.valueOf(this));
-            }
+            log.finer("Window {0} is not resizable", this);
             flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize;
         } else {
-            if (insLog.isLoggable(PlatformLogger.FINER)) {
-                log.finer("Window {0} is resizable", String.valueOf(this));
-            }
+            log.finer("Window {0} is resizable", this);
         }
         setSizeHints(flags, x, y, width, height);
     }
@@ -1355,14 +1346,10 @@
     void updateSizeHints(int x, int y) {
         long flags = isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition);
         if (!isResizable()) {
-            if (insLog.isLoggable(PlatformLogger.FINER)) {
-                log.finer("Window {0} is not resizable", String.valueOf(this));
-            }
+            log.finer("Window {0} is not resizable", this);
             flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize | XUtilConstants.PSize;
         } else {
-            if (insLog.isLoggable(PlatformLogger.FINER)) {
-                log.finer("Window {0} is resizable", String.valueOf(this));
-            }
+            log.finer("Window {0} is resizable", this);
         }
         setSizeHints(flags, x, y, width, height);
     }
--- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Wed May 11 11:08:03 2011 -0400
@@ -372,7 +372,7 @@
         if (iconLog.isLoggable(PlatformLogger.FINEST)) {
             iconLog.finest(">>> Sizes of icon images:");
             for (Iterator<XIconInfo> i = icons.iterator(); i.hasNext(); ) {
-                iconLog.finest("    {0}", String.valueOf(i.next()));
+                iconLog.finest("    {0}", i.next());
             }
         }
     }
@@ -789,9 +789,7 @@
     public void handleFocusEvent(XEvent xev) {
         XFocusChangeEvent xfe = xev.get_xfocus();
         FocusEvent fe;
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
-            focusLog.fine("{0}", String.valueOf(xfe));
-        }
+        focusLog.fine("{0}", xfe);
         if (isEventDisabled(xev)) {
             return;
         }
@@ -1488,10 +1486,7 @@
             synchronized(getStateLock()) {
                 XDialogPeer blockerPeer = (XDialogPeer) AWTAccessor.getComponentAccessor().getPeer(d);
                 if (blocked) {
-                    if (log.isLoggable(PlatformLogger.FINE)) {
-                        log.fine("{0} is blocked by {1}",
-                                 String.valueOf(this), String.valueOf(blockerPeer));
-                    }
+                    log.fine("{0} is blocked by {1}", this, blockerPeer);
                     modalBlocker = d;
 
                     if (isReparented() || XWM.isNonReparentingWM()) {
@@ -2022,8 +2017,7 @@
         XCrossingEvent xce = xev.get_xcrossing();
         if (grabLog.isLoggable(PlatformLogger.FINE)) {
             grabLog.fine("{0}, when grabbed {1}, contains {2}",
-                         String.valueOf(xce), isGrabbed(),
-                         containsGlobal(xce.get_x_root(), xce.get_y_root()));
+                         xce, isGrabbed(), containsGlobal(xce.get_x_root(), xce.get_y_root()));
         }
         if (isGrabbed()) {
             // When window is grabbed, all events are dispatched to
@@ -2034,10 +2028,7 @@
             // since it generates MOUSE_ENTERED/MOUSE_EXITED for frame and dialog.
             // (fix for 6390326)
             XBaseWindow target = XToolkit.windowToXWindow(xce.get_window());
-            if (grabLog.isLoggable(PlatformLogger.FINER)) {
-                grabLog.finer("  -  Grab event target {0}",
-                              String.valueOf(target));
-            }
+            grabLog.finer("  -  Grab event target {0}", target);
             if (target != null && target != this) {
                 target.dispatchEvent(xev);
                 return;
@@ -2050,8 +2041,7 @@
         XMotionEvent xme = xev.get_xmotion();
         if (grabLog.isLoggable(PlatformLogger.FINE)) {
             grabLog.finer("{0}, when grabbed {1}, contains {2}",
-                          String.valueOf(xme), isGrabbed(),
-                          containsGlobal(xme.get_x_root(), xme.get_y_root()));
+                          xme, isGrabbed(), containsGlobal(xme.get_x_root(), xme.get_y_root()));
         }
         if (isGrabbed()) {
             boolean dragging = false;
@@ -2080,9 +2070,7 @@
                 xme.set_x(localCoord.x);
                 xme.set_y(localCoord.y);
             }
-            if (grabLog.isLoggable(PlatformLogger.FINER)) {
-                grabLog.finer("  -  Grab event target {0}", String.valueOf(target));
-            }
+            grabLog.finer("  -  Grab event target {0}", target);
             if (target != null) {
                 if (target != getContentXWindow() && target != this) {
                     target.dispatchEvent(xev);
@@ -2116,9 +2104,7 @@
         }
         if (grabLog.isLoggable(PlatformLogger.FINE)) {
             grabLog.fine("{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})",
-                         String.valueOf(xbe), isGrabbed(),
-                         containsGlobal(xbe.get_x_root(), xbe.get_y_root()),
-                         getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight());
+                         xbe, isGrabbed(), containsGlobal(xbe.get_x_root(), xbe.get_y_root()), getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight());
         }
         if (isGrabbed()) {
             // When window is grabbed, all events are dispatched to
@@ -2127,10 +2113,7 @@
             // translation)
             XBaseWindow target = XToolkit.windowToXWindow(xbe.get_window());
             try {
-                if (grabLog.isLoggable(PlatformLogger.FINER)) {
-                    grabLog.finer("  -  Grab event target {0} (press target {1})",
-                                  String.valueOf(target), String.valueOf(pressTarget));
-                }
+                grabLog.finer("  -  Grab event target {0} (press target {1})", target, pressTarget);
                 if (xbe.get_type() == XConstants.ButtonPress
                     && xbe.get_button() == XConstants.buttons[0])
                 {
@@ -2164,10 +2147,7 @@
                         // According to the specification of UngrabEvent, post it
                         // when press occurs outside of the window and not on its owned windows
                         if (xbe.get_type() == XConstants.ButtonPress) {
-                            if (grabLog.isLoggable(PlatformLogger.FINE)) {
-                                grabLog.fine("Generating UngrabEvent on {0} because not inside of shell",
-                                             String.valueOf(this));
-                            }
+                            grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this);
                             postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                             return;
                         }
@@ -2186,27 +2166,18 @@
                             // toplevel == null - outside of
                             // hierarchy, toplevel is Dialog - should
                             // send ungrab (but shouldn't for Window)
-                            if (grabLog.isLoggable(PlatformLogger.FINE)) {
-                                grabLog.fine("Generating UngrabEvent on {0} because hierarchy ended",
-                                             String.valueOf(this));
-                            }
+                            grabLog.fine("Generating UngrabEvent on {0} because hierarchy ended", this);
                             postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                         }
                     } else {
                         // toplevel is null - outside of hierarchy
-                        if (grabLog.isLoggable(PlatformLogger.FINE)) {
-                            grabLog.fine("Generating UngrabEvent on {0} because toplevel is null",
-                                         String.valueOf(this));
-                        }
+                        grabLog.fine("Generating UngrabEvent on {0} because toplevel is null", this);
                         postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                         return;
                     }
                 } else {
                     // target doesn't map to XAWT window - outside of hierarchy
-                    if (grabLog.isLoggable(PlatformLogger.FINE)) {
-                        grabLog.fine("Generating UngrabEvent on because target is null {0}",
-                                     String.valueOf(this));
-                    }
+                    grabLog.fine("Generating UngrabEvent on because target is null {0}", this);
                     postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
                     return;
                 }
--- a/src/solaris/classes/sun/awt/X11InputMethod.java	Wed May 04 21:51:41 2011 +0100
+++ b/src/solaris/classes/sun/awt/X11InputMethod.java	Wed May 11 11:08:03 2011 -0400
@@ -325,11 +325,8 @@
             return;
 
         if (lastXICFocussedComponent != null){
-            if (log.isLoggable(PlatformLogger.FINE)) {
-                log.fine("XICFocused {0}, AWTFocused {1}",
-                         String.valueOf(lastXICFocussedComponent),
-                         String.valueOf(awtFocussedComponent));
-            }
+            if (log.isLoggable(PlatformLogger.FINE)) log.fine("XICFocused {0}, AWTFocused {1}",
+                                                              lastXICFocussedComponent, awtFocussedComponent);
         }
 
         if (pData == 0) {