You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lg...@apache.org on 2015/10/23 19:56:16 UTC

[3/4] [lang] LANG-1171 Remove log of excluded methods in StringUtilsTest.testStringUtilsCharSequenceContract()

LANG-1171 Remove log of excluded methods in StringUtilsTest.testStringUtilsCharSequenceContract()


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

Branch: refs/heads/master
Commit: 51512905c31ff19b91fc67b2cb3ddb5b1fa0fd51
Parents: 131917a
Author: Loic Guibert <lg...@apache.org>
Authored: Wed Oct 21 15:15:06 2015 +0400
Committer: Loic Guibert <lg...@apache.org>
Committed: Wed Oct 21 15:15:06 2015 +0400

----------------------------------------------------------------------
 src/test/java/org/apache/commons/lang3/StringUtilsTest.java | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/51512905/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
index a57a7f5..c49ee6a 100644
--- a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
+++ b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
@@ -2390,9 +2390,7 @@ public class StringUtilsTest {
                 // don't actively test for that.
                 final Class<?>[] params = m.getParameterTypes();
                 if (params.length > 0 && (params[0] == CharSequence.class || params[0] == CharSequence[].class)) {
-                    if (ArrayUtils.contains(excludeMethods, methodStr)) {
-                        System.out.println("The mutable method \"" + methodStr + "\" is expressly excluded from testStringUtilsCharSequenceContract()");
-                    } else {
+                    if (!ArrayUtils.contains(excludeMethods, methodStr)) {
                         fail("The method \"" + methodStr + "\" appears to be mutable in spirit and therefore must not accept a CharSequence");
                     }
                 }
@@ -2401,9 +2399,7 @@ public class StringUtilsTest {
                 // As above, it may be something other than CharSequence.
                 final Class<?>[] params = m.getParameterTypes();
                 if (params.length > 0 && (params[0] == String.class || params[0] == String[].class)) {
-                    if (ArrayUtils.contains(excludeMethods, methodStr)) {
-                        System.out.println("The immutable method \"" + methodStr + "\" is expressly excluded from testStringUtilsCharSequenceContract()");
-                    } else {
+                    if (!ArrayUtils.contains(excludeMethods, methodStr)) {
                         fail("The method \"" + methodStr + "\" appears to be immutable in spirit and therefore must not accept a String");
                     }
                 }