commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [lang] Remove unnecessary else.
Date Sun, 05 Jun 2016 23:47:24 GMT
Repository: commons-lang
Updated Branches:
  refs/heads/master 6838ba320 -> 6c687c70a


Remove unnecessary else.

Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/6c687c70
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/6c687c70
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/6c687c70

Branch: refs/heads/master
Commit: 6c687c70a1d5cdbc71c113b7d7402dd89a942849
Parents: 6838ba3
Author: ggregory <ggregory@apache.org>
Authored: Sun Jun 5 16:47:19 2016 -0700
Committer: ggregory <ggregory@apache.org>
Committed: Sun Jun 5 16:47:19 2016 -0700

----------------------------------------------------------------------
 src/main/java/org/apache/commons/lang3/StringUtils.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/6c687c70/src/main/java/org/apache/commons/lang3/StringUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index e2e928a..f2b8554 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -570,9 +570,8 @@ public class StringUtils {
         if (str.length() > maxWidth) {
             int ix = offset + maxWidth > str.length() ? str.length() : offset + maxWidth;
             return str.substring(offset, ix);
-        } else {
-            return str.substring(offset);
         }
+        return str.substring(offset);
     }
 
     // Stripping


Mime
View raw message