Skip to content

Commit 10ee07e

Browse files
committed
use List.sort()
1 parent fa9c653 commit 10ee07e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

visualvm/libs.profiler/lib.profiler.ui/src/org/graalvm/visualvm/lib/ui/swing/ProfilerColumnModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,10 @@ void loadFromStorage(Properties properties, ProfilerTable table) {
382382
}
383383
} catch (NumberFormatException e) {}
384384
}
385-
Collections.sort(tableColumns, new Comparator<TableColumn>() {
385+
tableColumns.sort(new Comparator<TableColumn>() {
386386
public int compare(TableColumn c1, TableColumn c2) {
387-
Integer index1 = (Integer)c1.getIdentifier();
388-
Integer index2 = (Integer)c2.getIdentifier();
387+
Integer index1 = (Integer) c1.getIdentifier();
388+
Integer index2 = (Integer) c2.getIdentifier();
389389
return index1.compareTo(index2);
390390
}
391391
});

visualvm/pluginimporter/src/org/graalvm/visualvm/pluginimporter/ImportManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public PluginImporter getPluginImporter() {
102102

103103
private void initialize() {
104104
toInstall = new ArrayList<>(importer.getPluginsAvailableToInstall());
105-
Collections.sort(toInstall, new Comparator<UpdateElement>() {
105+
toInstall.sort(new Comparator<UpdateElement>() {
106106
@Override
107107
public int compare(UpdateElement o1, UpdateElement o2) {
108108
return o1.getDisplayName().compareTo(o2.getDisplayName());
@@ -111,7 +111,7 @@ public int compare(UpdateElement o1, UpdateElement o2) {
111111
checkedToInstall = new ArrayList<>(Collections.nCopies(importer.getPluginsAvailableToInstall().size(), Boolean.TRUE));
112112

113113
toImport = new ArrayList<>(importer.getPluginsToImport());
114-
Collections.sort(toImport, new Comparator<UpdateElement>() {
114+
toImport.sort(new Comparator<UpdateElement>() {
115115
@Override
116116
public int compare(UpdateElement o1, UpdateElement o2) {
117117
return o1.getDisplayName().compareTo(o2.getDisplayName());

0 commit comments

Comments
 (0)