--- a/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Tue Aug 18 20:47:13 2009 -0700
+++ b/jdk/src/share/classes/java/awt/KeyboardFocusManager.java Thu Aug 20 12:46:43 2009 +0400
@@ -611,7 +611,7 @@
void setNativeFocusOwner(Component comp) {
if (focusLog.isLoggable(Level.FINEST)) {
focusLog.log(Level.FINEST, "Calling peer {0} setCurrentFocusOwner for {1}",
- new Object[] {peer, comp});
+ new Object[] {String.valueOf(peer), String.valueOf(comp)});
}
peer.setCurrentFocusOwner(comp);
}
@@ -2363,20 +2363,20 @@
Window nativeFocusedWindow = thisManager.getNativeFocusedWindow();
if (focusLog.isLoggable(Level.FINER)) {
focusLog.log(Level.FINER, "SNFH for {0} in {1}",
- new Object[] {descendant, heavyweight});
+ new Object[] {String.valueOf(descendant), String.valueOf(heavyweight)});
}
if (focusLog.isLoggable(Level.FINEST)) {
focusLog.log(Level.FINEST, "0. Current focus owner {0}",
- currentFocusOwner);
+ String.valueOf(currentFocusOwner));
focusLog.log(Level.FINEST, "0. Native focus owner {0}",
- nativeFocusOwner);
+ String.valueOf(nativeFocusOwner));
focusLog.log(Level.FINEST, "0. Native focused window {0}",
- nativeFocusedWindow);
+ String.valueOf(nativeFocusedWindow));
}
synchronized (heavyweightRequests) {
HeavyweightFocusRequest hwFocusRequest = getLastHWRequest();
if (focusLog.isLoggable(Level.FINEST)) {
- focusLog.log(Level.FINEST, "Request {0}", hwFocusRequest);
+ focusLog.log(Level.FINEST, "Request {0}", String.valueOf(hwFocusRequest));
}
if (hwFocusRequest == null &&
heavyweight == nativeFocusOwner)
@@ -2385,7 +2385,7 @@
// Redundant request.
if (focusLog.isLoggable(Level.FINEST))
focusLog.log(Level.FINEST, "1. SNFH_FAILURE for {0}",
- descendant);
+ String.valueOf(descendant));
return SNFH_FAILURE;
}
@@ -2418,7 +2418,7 @@
SunToolkit.postEvent(descendant.appContext, newFocusOwnerEvent);
if (focusLog.isLoggable(Level.FINEST))
- focusLog.log(Level.FINEST, "2. SNFH_HANDLED for {0}", descendant);
+ focusLog.log(Level.FINEST, "2. SNFH_HANDLED for {0}", String.valueOf(descendant));
return SNFH_SUCCESS_HANDLED;
} else if (hwFocusRequest != null &&
hwFocusRequest.heavyweight == heavyweight) {
@@ -2857,11 +2857,12 @@
KeyboardFocusManager manager = getCurrentKeyboardFocusManager();
if (focusLog.isLoggable(Level.FINER)) {
if (event instanceof FocusEvent || event instanceof WindowEvent) {
- focusLog.log(Level.FINER, ">>> {0}", new Object[] {event});
+ focusLog.log(Level.FINER, ">>> {0}", new Object[] {String.valueOf(event)});
}
if (focusLog.isLoggable(Level.FINER) && event instanceof KeyEvent) {
- focusLog.log(Level.FINER, " focus owner is {0}", new Object[] {manager.getGlobalFocusOwner()});
- focusLog.log(Level.FINER, ">>> {0}", new Object[] {event});
+ focusLog.log(Level.FINER, " focus owner is {0}",
+ new Object[] {String.valueOf(manager.getGlobalFocusOwner())});
+ focusLog.log(Level.FINER, ">>> {0}", new Object[] {String.valueOf(event)});
}
}