--- old/src/share/classes/java/awt/KeyboardFocusManager.java 2014-04-30 15:45:48.000000000 -0700 +++ new/src/share/classes/java/awt/KeyboardFocusManager.java 2014-04-30 15:45:47.000000000 -0700 @@ -348,6 +348,7 @@ * Component of those Windows that has no such array of its own explicitly * set. */ + @SuppressWarnings({"unchecked", "rawtypes"}) private Set[] defaultFocusTraversalKeys = new Set[4]; /** @@ -422,7 +423,7 @@ targetSet.add(AWTKeyStroke.getAWTKeyStroke(tokens.nextToken())); } return (targetSet.isEmpty()) - ? Collections.EMPTY_SET + ? Collections.emptySet() : Collections.unmodifiableSet(targetSet); } @@ -436,7 +437,7 @@ work_set.add(defaultFocusTraversalKeyStrokes[i][j]); } defaultFocusTraversalKeys[i] = (work_set.isEmpty()) - ? Collections.EMPTY_SET + ? Collections.emptySet() : Collections.unmodifiableSet(work_set); } initPeer(); @@ -1750,11 +1751,12 @@ * @see #addKeyEventDispatcher * @see #removeKeyEventDispatcher */ + @SuppressWarnings("unchecked") // Cast of result of clone protected synchronized java.util.List getKeyEventDispatchers() { return (keyEventDispatchers != null) - ? (java.util.List)keyEventDispatchers.clone() + ? (java.util.List)keyEventDispatchers.clone() : null; } @@ -1841,11 +1843,12 @@ * @see #addKeyEventPostProcessor * @see #removeKeyEventPostProcessor */ + @SuppressWarnings("unchecked") // Cast of result of clone protected java.util.List getKeyEventPostProcessors() { return (keyEventPostProcessors != null) - ? (java.util.List)keyEventPostProcessors.clone() + ? (java.util.List)keyEventPostProcessors.clone() : null; } @@ -1907,8 +1910,7 @@ * javax.swing.JComponent.runInputVerifier() using reflection. */ static synchronized Component getMostRecentFocusOwner(Window window) { - WeakReference weakValue = - (WeakReference)mostRecentFocusOwners.get(window); + WeakReference weakValue = mostRecentFocusOwners.get(window); return weakValue == null ? null : weakValue.get(); }