equal
deleted
inserted
replaced
107 new GetPropertyAction("swing.legacySortingFTPEnabled", "true"))); |
107 new GetPropertyAction("swing.legacySortingFTPEnabled", "true"))); |
108 legacyMergeSortMethod = legacySortingFTPEnabled ? |
108 legacyMergeSortMethod = legacySortingFTPEnabled ? |
109 AccessController.doPrivileged(new PrivilegedAction<Method>() { |
109 AccessController.doPrivileged(new PrivilegedAction<Method>() { |
110 public Method run() { |
110 public Method run() { |
111 try { |
111 try { |
112 Class c = Class.forName("java.util.Arrays"); |
112 Method m = java.util.Arrays.class.getDeclaredMethod("legacyMergeSort", |
113 Method m = c.getDeclaredMethod("legacyMergeSort", new Class[]{Object[].class, Comparator.class}); |
113 new Class<?>[]{Object[].class, |
|
114 Comparator.class}); |
114 m.setAccessible(true); |
115 m.setAccessible(true); |
115 return m; |
116 return m; |
116 } catch (ClassNotFoundException | NoSuchMethodException e) { |
117 } catch (NoSuchMethodException e) { |
117 // using default sorting algo |
118 // using default sorting algo |
118 return null; |
119 return null; |
119 } |
120 } |
120 } |
121 } |
121 }) : |
122 }) : |