ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [2/3] ant git commit: use Comparator's standard implementation
Date Mon, 09 Apr 2018 07:39:31 GMT
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 <bodewig@apache.org>
Authored: Mon Apr 9 09:04:43 2018 +0200
Committer: Stefan Bodewig <bodewig@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);
             }


Mime
View raw message