You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by mb...@apache.org on 2017/04/20 19:35:28 UTC

ant git commit: invert String equals tests

Repository: ant
Updated Branches:
  refs/heads/master 1730e18ba -> 5c564d9aa


invert String equals tests


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/5c564d9a
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/5c564d9a
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/5c564d9a

Branch: refs/heads/master
Commit: 5c564d9aa59f368b1c968f471efcd6f66314b9db
Parents: 1730e18
Author: Matt Benson <mb...@apache.org>
Authored: Thu Apr 20 14:35:23 2017 -0500
Committer: Matt Benson <mb...@apache.org>
Committed: Thu Apr 20 14:35:23 2017 -0500

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/types/Path.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/5c564d9a/src/main/org/apache/tools/ant/types/Path.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java
index 3a671fa..edd5d30 100644
--- a/src/main/org/apache/tools/ant/types/Path.java
+++ b/src/main/org/apache/tools/ant/types/Path.java
@@ -562,22 +562,22 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
         if (o != null) {
             order = o;
         }
-        if (order.equals("only")) {
+        if ("only".equals(order)) {
             // only: the developer knows what (s)he is doing
             result.addExisting(p, true);
 
-        } else if (order.equals("first")) {
+        } else if ("first".equals(order)) {
             // first: developer could use a little help
             result.addExisting(p, true);
             result.addExisting(this);
 
-        } else if (order.equals("ignore")) {
+        } else if ("ignore".equals(order)) {
             // ignore: don't trust anyone
             result.addExisting(this);
 
         } else {
             // last: don't trust the developer
-            if (!order.equals("last")) {
+            if (!"last".equals(order)) {
                 log("invalid value for " + MagicNames.BUILD_SYSCLASSPATH
                     + ": " + order,
                     Project.MSG_WARN);