src/share/classes/sun/awt/KeyboardFocusManagerPeerImpl.java

Print this page

        

@@ -55,12 +55,13 @@
 
     @Override
     public void clearGlobalFocusOwner(Window activeWindow) {
         if (activeWindow != null) {
             Component focusOwner = activeWindow.getFocusOwner();
-            if (focusLog.isLoggable(PlatformLogger.FINE))
+            if (focusLog.isLoggable(PlatformLogger.FINE)) {
                 focusLog.fine("Clearing global focus owner " + focusOwner);
+            }
             if (focusOwner != null) {
                 FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
                                                      CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
                 SunToolkit.postPriorityEvent(fl);
             }

@@ -124,20 +125,22 @@
         }
         if (currentOwner != null) {
             FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
                                                  false, lightweightChild, cause);
 
-            if (focusLog.isLoggable(PlatformLogger.FINER))
+            if (focusLog.isLoggable(PlatformLogger.FINER)) {
                 focusLog.finer("Posting focus event: " + fl);
+            }
             SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl);
         }
 
         FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
                                              false, currentOwner, cause);
 
-        if (focusLog.isLoggable(PlatformLogger.FINER))
+        if (focusLog.isLoggable(PlatformLogger.FINER)) {
             focusLog.finer("Posting focus event: " + fg);
+        }
         SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg);
         return true;
     }
 
     // WARNING: Don't call it on the Toolkit thread.