LANG-1171 Remove log of excluded methods in StringUtilsTest.testStringUtilsCharSequenceContract()
This commit is contained in:
parent
131917a0d3
commit
51512905c3
|
@ -2390,9 +2390,7 @@ public class StringUtilsTest {
|
||||||
// don't actively test for that.
|
// don't actively test for that.
|
||||||
final Class<?>[] params = m.getParameterTypes();
|
final Class<?>[] params = m.getParameterTypes();
|
||||||
if (params.length > 0 && (params[0] == CharSequence.class || params[0] == CharSequence[].class)) {
|
if (params.length > 0 && (params[0] == CharSequence.class || params[0] == CharSequence[].class)) {
|
||||||
if (ArrayUtils.contains(excludeMethods, methodStr)) {
|
if (!ArrayUtils.contains(excludeMethods, methodStr)) {
|
||||||
System.out.println("The mutable method \"" + methodStr + "\" is expressly excluded from testStringUtilsCharSequenceContract()");
|
|
||||||
} else {
|
|
||||||
fail("The method \"" + methodStr + "\" appears to be mutable in spirit and therefore must not accept a CharSequence");
|
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.
|
// As above, it may be something other than CharSequence.
|
||||||
final Class<?>[] params = m.getParameterTypes();
|
final Class<?>[] params = m.getParameterTypes();
|
||||||
if (params.length > 0 && (params[0] == String.class || params[0] == String[].class)) {
|
if (params.length > 0 && (params[0] == String.class || params[0] == String[].class)) {
|
||||||
if (ArrayUtils.contains(excludeMethods, methodStr)) {
|
if (!ArrayUtils.contains(excludeMethods, methodStr)) {
|
||||||
System.out.println("The immutable method \"" + methodStr + "\" is expressly excluded from testStringUtilsCharSequenceContract()");
|
|
||||||
} else {
|
|
||||||
fail("The method \"" + methodStr + "\" appears to be immutable in spirit and therefore must not accept a String");
|
fail("The method \"" + methodStr + "\" appears to be immutable in spirit and therefore must not accept a String");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue