< prev index next >

src/share/classes/java/awt/DefaultKeyboardFocusManager.java

Print this page
rev 1571 : 8010297: Missing isLoggable() checks in logging code
Summary: Add isLoggable() checks
Reviewed-by: anthony, mchung, serb
Contributed-by: Laurent Bourges <bourges.laurent@gmail.com>

*** 284,294 **** * @param e the AWTEvent to be dispatched * @return <code>true</code> if this method dispatched the event; * <code>false</code> otherwise */ public boolean dispatchEvent(AWTEvent e) { ! if (focusLog.isLoggable(Level.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e); switch (e.getID()) { case WindowEvent.WINDOW_GAINED_FOCUS: { WindowEvent we = (WindowEvent)e; Window oldFocusedWindow = getGlobalFocusedWindow(); Window newFocusedWindow = we.getWindow(); --- 284,296 ---- * @param e the AWTEvent to be dispatched * @return <code>true</code> if this method dispatched the event; * <code>false</code> otherwise */ public boolean dispatchEvent(AWTEvent e) { ! if (focusLog.isLoggable(Level.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) { ! focusLog.fine("" + e); ! } switch (e.getID()) { case WindowEvent.WINDOW_GAINED_FOCUS: { WindowEvent we = (WindowEvent)e; Window oldFocusedWindow = getGlobalFocusedWindow(); Window newFocusedWindow = we.getWindow();
< prev index next >