[SUREFIRE] refactoring of StringUtils
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/4b35269b Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/4b35269b Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/4b35269b Branch: refs/heads/master Commit: 4b35269b1e4df43464afaba1241045b46ebe9324 Parents: 1d0ac00 Author: Tibor17 <tibo...@lycos.com> Authored: Mon Jul 13 20:53:13 2015 +0200 Committer: Tibor17 <tibo...@lycos.com> Committed: Thu Jul 23 23:28:05 2015 +0200 ---------------------------------------------------------------------- .../org/apache/maven/surefire/util/internal/StringUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/4b35269b/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/StringUtils.java ---------------------------------------------------------------------- diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/StringUtils.java b/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/StringUtils.java index 831c7e7..8158fb7 100644 --- a/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/StringUtils.java +++ b/surefire-api/src/main/java/org/apache/maven/surefire/util/internal/StringUtils.java @@ -82,7 +82,7 @@ public class StringUtils } int listSize = tok.countTokens(); - if ( ( max > 0 ) && ( listSize > max ) ) + if ( max > 0 && listSize > max ) { listSize = max; } @@ -93,7 +93,7 @@ public class StringUtils int lastTokenEnd = 0; while ( tok.hasMoreTokens() ) { - if ( ( max > 0 ) && ( i == listSize - 1 ) ) + if ( max > 0 && i == listSize - 1 ) { // In the situation where we hit the max yet have // tokens left over in our input, the last list