changeset 10393:802c5168d429

8049797: Fix raw and unchecked lint warnings in javax.swing.SortingFocusTraversalPolicy Reviewed-by: prr
author darcy
date Thu, 10 Jul 2014 15:27:02 -0700
parents 6c875efda606
children 0f61d05e28f1
files src/share/classes/javax/swing/SortingFocusTraversalPolicy.java
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java	Thu Jul 10 18:46:40 2014 +0400
+++ b/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;
                     }