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 2017/10/15 05:25:32 UTC

[3/3] ant git commit: Remove the redundant nullcheck of value known to be non-null.

Remove the redundant nullcheck of value known to be non-null.

This statement contains a redundant check of a known non-null s against the constant null.
http://findbugs.sourceforge.net/bugDescriptions.html#RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE


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

Branch: refs/heads/1.9.x
Commit: 9ec11ae3b04d5a8389a6f90b70463f16ecd541a2
Parents: 20fe0ff
Author: Kui LIU <br...@gmail.com>
Authored: Sat Oct 14 17:20:29 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sun Oct 15 07:25:19 2017 +0200

----------------------------------------------------------------------
 src/main/org/apache/tools/ant/dispatch/DispatchUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/9ec11ae3/src/main/org/apache/tools/ant/dispatch/DispatchUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/apache/tools/ant/dispatch/DispatchUtils.java b/src/main/org/apache/tools/ant/dispatch/DispatchUtils.java
index 1a7c1f9..62dd88f 100644
--- a/src/main/org/apache/tools/ant/dispatch/DispatchUtils.java
+++ b/src/main/org/apache/tools/ant/dispatch/DispatchUtils.java
@@ -64,7 +64,7 @@ public class DispatchUtils {
                             final Object o = actionM.invoke(dispatchable, (Object[]) null);
                             if (o != null) {
                                 final String s = o.toString();
-                                if (s != null && s.trim().length() > 0) {
+                                if (s.trim().length() > 0) {
                                     methodName = s.trim();
                                     Method executeM = null;
                                     executeM = dispatchable.getClass().getMethod(