commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r653924 - in /commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect: ConstructorUtilsTest.java MethodUtilsTest.java
Date Tue, 06 May 2008 21:11:00 GMT
Author: mbenson
Date: Tue May  6 14:11:00 2008
New Revision: 653924

URL: http://svn.apache.org/viewvc?rev=653924&view=rev
Log:
remove use of 1.5 Arrays.toString()

Modified:
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java?rev=653924&r1=653923&r2=653924&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/ConstructorUtilsTest.java
Tue May  6 14:11:00 2008
@@ -212,11 +212,15 @@
             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) {

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java?rev=653924&r1=653923&r2=653924&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/reflect/MethodUtilsTest.java
Tue May  6 14:11:00 2008
@@ -313,8 +313,8 @@
             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 @@
         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) {



Mime
View raw message