From be41c05edc0bfafc89fb36956cc5fa434e44fc14 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Thu, 10 Jul 2014 15:27:02 -0700 Subject: [PATCH] 8049797: Fix raw and unchecked lint warnings in javax.swing.SortingFocusTraversalPolicy Reviewed-by: prr --- .../classes/javax/swing/SortingFocusTraversalPolicy.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java b/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java index 797f6f35524..7199531c61b 100644 --- a/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java +++ b/jdk/src/share/classes/javax/swing/SortingFocusTraversalPolicy.java @@ -109,11 +109,12 @@ public class SortingFocusTraversalPolicy AccessController.doPrivileged(new PrivilegedAction() { 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; }