You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2018/04/09 07:39:31 UTC
[2/3] ant git commit: use Comparator's standard implementation
use Comparator's standard implementation
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/c57d1b4f
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/c57d1b4f
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/c57d1b4f
Branch: refs/heads/master
Commit: c57d1b4f9cf4cb9079a354650f9b28c2014ec875
Parents: b822486
Author: Stefan Bodewig <bo...@apache.org>
Authored: Mon Apr 9 09:04:43 2018 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Mon Apr 9 09:04:43 2018 +0200
----------------------------------------------------------------------
src/main/org/apache/tools/ant/filters/SortFilter.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/c57d1b4f/src/main/org/apache/tools/ant/filters/SortFilter.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/filters/SortFilter.java b/src/main/org/apache/tools/ant/filters/SortFilter.java
index ebe0835..9ee2638 100644
--- a/src/main/org/apache/tools/ant/filters/SortFilter.java
+++ b/src/main/org/apache/tools/ant/filters/SortFilter.java
@@ -351,9 +351,7 @@ public final class SortFilter extends BaseParamFilterReader
private void sort() {
if (comparator == null) {
if (isReverse()) {
- lines.sort((s1, s2) -> {
- return -s1.compareTo(s2); //NOSONAR
- });
+ lines.sort(Comparator.reverseOrder());
} else {
Collections.sort(lines);
}