mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
IDEA-163980 Inspection "Collections.sort() can be replaced with List.sort()" may leave unnecessary parentheses
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// "Replace with List.sort" "true"
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
void sortChildren() {
|
||||
getChildren().sort(Comparator.naturalOrder());
|
||||
}
|
||||
|
||||
List<String> getChildren() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Replace with List.sort" "true"
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
void sortChildren() {
|
||||
Collections.so<caret>rt(getChildren(), Comparator.naturalOrder());
|
||||
}
|
||||
|
||||
List<String> getChildren() {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user