From 51512905c31ff19b91fc67b2cb3ddb5b1fa0fd51 Mon Sep 17 00:00:00 2001 From: Loic Guibert Date: Wed, 21 Oct 2015 15:15:06 +0400 Subject: [PATCH] LANG-1171 Remove log of excluded methods in StringUtilsTest.testStringUtilsCharSequenceContract() --- .../java/org/apache/commons/lang3/StringUtilsTest.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/apache/commons/lang3/StringUtilsTest.java b/src/test/java/org/apache/commons/lang3/StringUtilsTest.java index a57a7f5ca..c49ee6a07 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"); } }