aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder/src
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 /bcel-builder/src
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 'bcel-builder/src')
-rw-r--r--bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ClassGen.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ClassGen.java b/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ClassGen.java
index 943b77f6e..371013997 100644
--- a/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ClassGen.java
+++ b/bcel-builder/src/main/java/org/aspectj/apache/bcel/generic/ClassGen.java
@@ -509,7 +509,7 @@ public class ClassGen extends Modifiers implements Cloneable {
relevantFields.add(field);
}
}
- Collections.sort(relevantFields, new FieldComparator());
+ relevantFields.sort(new FieldComparator());
int relevantFlags = Constants.ACC_PUBLIC | Constants.ACC_PRIVATE | Constants.ACC_PROTECTED | Constants.ACC_STATIC
| Constants.ACC_FINAL | Constants.ACC_VOLATILE | Constants.ACC_TRANSIENT;
for (Field f : relevantFields) {
@@ -534,8 +534,8 @@ public class ClassGen extends Modifiers implements Cloneable {
relevantMethods.add(m);
}
}
- Collections.sort(relevantCtors, new ConstructorComparator());
- Collections.sort(relevantMethods, new MethodComparator());
+ relevantCtors.sort(new ConstructorComparator());
+ relevantMethods.sort(new MethodComparator());
// 5. If a class initializer exists, write out the following:
// 1. The name of the method, <clinit>.