8049797: Fix raw and unchecked lint warnings in javax.swing.SortingFocusTraversalPolicy

Reviewed-by: prr
This commit is contained in:
Joe Darcy 2014-07-10 15:27:02 -07:00
parent cb14edb87e
commit be41c05edc

View File

@ -109,11 +109,12 @@ public class SortingFocusTraversalPolicy
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;
}