diff -r 93f3ca259c48 -r b906a74c6882 jdk/src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java --- a/jdk/src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java Thu Jul 03 18:47:42 2014 +0400 +++ b/jdk/src/share/classes/javax/swing/LayoutFocusTraversalPolicy.java Thu Jul 03 15:24:27 2014 -0700 @@ -98,7 +98,7 @@ if (aContainer == null || aComponent == null) { throw new IllegalArgumentException("aContainer and aComponent cannot be null"); } - Comparator comparator = getComparator(); + Comparator comparator = getComparator(); if (comparator instanceof LayoutComparator) { ((LayoutComparator)comparator). setComponentOrientation(aContainer. @@ -134,7 +134,7 @@ if (aContainer == null || aComponent == null) { throw new IllegalArgumentException("aContainer and aComponent cannot be null"); } - Comparator comparator = getComparator(); + Comparator comparator = getComparator(); if (comparator instanceof LayoutComparator) { ((LayoutComparator)comparator). setComponentOrientation(aContainer. @@ -158,7 +158,7 @@ if (aContainer == null) { throw new IllegalArgumentException("aContainer cannot be null"); } - Comparator comparator = getComparator(); + Comparator comparator = getComparator(); if (comparator instanceof LayoutComparator) { ((LayoutComparator)comparator). setComponentOrientation(aContainer. @@ -182,7 +182,7 @@ if (aContainer == null) { throw new IllegalArgumentException("aContainer cannot be null"); } - Comparator comparator = getComparator(); + Comparator comparator = getComparator(); if (comparator instanceof LayoutComparator) { ((LayoutComparator)comparator). setComponentOrientation(aContainer. @@ -233,7 +233,7 @@ // to be focusable by returning true here. return true; } else if (SunToolkit.isInstanceOf(aComponent, "javax.swing.JComboBox")) { - JComboBox box = (JComboBox)aComponent; + JComboBox box = (JComboBox)aComponent; return box.getUI().isFocusTraversable(box); } else if (aComponent instanceof JComponent) { JComponent jComponent = (JComponent)aComponent; @@ -256,10 +256,11 @@ out.writeObject(getComparator()); out.writeBoolean(getImplicitDownCycleTraversal()); } + @SuppressWarnings("unchecked") // Cast to (Comparator) private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - setComparator((Comparator)in.readObject()); + setComparator((Comparator)in.readObject()); setImplicitDownCycleTraversal(in.readBoolean()); } }