aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authorLars Grefer <eclipse@larsgrefer.de>2020-08-15 16:13:00 +0200
committerLars Grefer <eclipse@larsgrefer.de>2020-08-15 16:13:00 +0200
commitefa2e5ce8c9cc2d20ab7479d1caa4a2ae1de6e8a (patch)
tree7be97c63260610ad409b9dbd889fbe9bfaf5b434 /ajde
parent7824e7d3045b9db278a96a21e69110976767b32e (diff)
downloadaspectj-efa2e5ce8c9cc2d20ab7479d1caa4a2ae1de6e8a.tar.gz
aspectj-efa2e5ce8c9cc2d20ab7479d1caa4a2ae1de6e8a.zip
Collections.sort() can be replaced with List.sort()
Reports calls to Collections.sort(list, comparator) which could be replaced with list.sort(comparator). Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'ajde')
-rw-r--r--ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java2
-rw-r--r--ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java b/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java
index cde164cc1..20db17581 100644
--- a/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java
+++ b/ajde/src/main/java/org/aspectj/ajde/internal/LstBuildConfigManager.java
@@ -291,7 +291,7 @@ public class LstBuildConfigManager implements BuildConfigManager {
private void sortModel(BuildConfigNode node, Comparator<BuildConfigNode> comparator) {
if (node == null || node.getChildren() == null)
return;
- Collections.sort(node.getChildren(), comparator);
+ node.getChildren().sort(comparator);
for (BuildConfigNode nextNode : node.getChildren()) {
if (nextNode != null)
sortModel(nextNode, comparator);
diff --git a/ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java b/ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
index 23f999ac8..a8a07ee34 100644
--- a/ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
+++ b/ajde/src/main/java/org/aspectj/ajde/ui/internal/TreeStructureViewBuilder.java
@@ -196,7 +196,7 @@ public class TreeStructureViewBuilder {
private void sortView(IStructureViewNode node, Comparator<IStructureViewNode> comparator) {
if (node == null || node.getChildren() == null) return;
- Collections.sort(node.getChildren(), comparator);
+ node.getChildren().sort(comparator);
for (Object o : node.getChildren()) {
IStructureViewNode nextNode = (IStructureViewNode) o;
if (nextNode != null) sortView(nextNode, comparator);