remove use of 1.5 Arrays.toString()
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@653924 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
04e9eb14e7
commit
e0da000caa
|
@ -212,11 +212,15 @@ public class ConstructorUtilsTest extends TestCase {
|
|||
Class[] requestTypes, Class[] actualTypes) {
|
||||
Constructor c = ConstructorUtils.getMatchingAccessibleConstructor(cls,
|
||||
requestTypes);
|
||||
assertTrue(Arrays.toString(c.getParameterTypes()) + " not equals "
|
||||
+ Arrays.toString(actualTypes), Arrays.equals(actualTypes, c
|
||||
assertTrue(toString(c.getParameterTypes()) + " not equals "
|
||||
+ toString(actualTypes), Arrays.equals(actualTypes, c
|
||||
.getParameterTypes()));
|
||||
}
|
||||
|
||||
private String toString(Class[] c) {
|
||||
return Arrays.asList(c).toString();
|
||||
}
|
||||
|
||||
private Class[] singletonArray(Class c) {
|
||||
Class[] result = (Class[]) classCache.get(c);
|
||||
if (result == null) {
|
||||
|
|
|
@ -313,8 +313,8 @@ public class MethodUtilsTest extends TestCase {
|
|||
String methodName, Class[] requestTypes, Class[] actualTypes) {
|
||||
Method m = MethodUtils.getMatchingAccessibleMethod(cls, methodName,
|
||||
requestTypes);
|
||||
assertTrue(Arrays.toString(m.getParameterTypes()) + " not equals "
|
||||
+ Arrays.toString(actualTypes), Arrays.equals(actualTypes, m
|
||||
assertTrue(toString(m.getParameterTypes()) + " not equals "
|
||||
+ toString(actualTypes), Arrays.equals(actualTypes, m
|
||||
.getParameterTypes()));
|
||||
}
|
||||
|
||||
|
@ -330,6 +330,10 @@ public class MethodUtilsTest extends TestCase {
|
|||
MethodUtils.setCacheMethods(true);
|
||||
}
|
||||
|
||||
private String toString(Class[] c) {
|
||||
return Arrays.asList(c).toString();
|
||||
}
|
||||
|
||||
private Class[] singletonArray(Class c) {
|
||||
Class[] result = (Class[]) classCache.get(c);
|
||||
if (result == null) {
|
||||
|
|
Loading…
Reference in New Issue