8049797: Fix raw and unchecked lint warnings in javax.swing.SortingFocusTraversalPolicy
Reviewed-by: prr
--- a/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java Thu Jul 10 18:46:40 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java Thu Jul 10 15:27:02 2014 -0700
@@ -109,11 +109,12 @@
AccessController.doPrivileged(new PrivilegedAction<Method>() {
public Method run() {
try {
- Class c = Class.forName("java.util.Arrays");
- Method m = c.getDeclaredMethod("legacyMergeSort", new Class[]{Object[].class, Comparator.class});
+ Method m = java.util.Arrays.class.getDeclaredMethod("legacyMergeSort",
+ new Class<?>[]{Object[].class,
+ Comparator.class});
m.setAccessible(true);
return m;
- } catch (ClassNotFoundException | NoSuchMethodException e) {
+ } catch (NoSuchMethodException e) {
// using default sorting algo
return null;
}