8049797: Fix raw and unchecked lint warnings in javax.swing.SortingFocusTraversalPolicy
authordarcy
Thu, 10 Jul 2014 15:27:02 -0700
changeset 25767 50bdc634f693
parent 25766 f979c6d18e22
child 25768 b10ec9701a7e
8049797: Fix raw and unchecked lint warnings in javax.swing.SortingFocusTraversalPolicy Reviewed-by: prr
jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
--- 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;
                     }