commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r983510 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
Date Mon, 09 Aug 2010 03:00:58 GMT
Author: sebb
Date: Mon Aug  9 03:00:58 2010
New Revision: 983510

URL: http://svn.apache.org/viewvc?rev=983510&view=rev
Log:
StringUtils.concat requires Object... not String...
Add varargs version

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java?rev=983510&r1=983509&r2=983510&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringUtilsTest.java
Mon Aug  9 03:00:58 2010
@@ -77,7 +77,7 @@ public class StringUtilsTest extends Tes
     private static final String[] EMPTY_ARRAY_LIST = {};
     private static final String[] NULL_ARRAY_LIST = {null};
     private static final String[] MIXED_ARRAY_LIST = {null, "", "foo"};
-    private static final Object[] MIXED_TYPE_LIST = {"foo", 2L};
+    private static final Object[] MIXED_TYPE_LIST = {"foo", Long.valueOf(2L)};
 
     private static final String SEPARATOR = ",";
     private static final char   SEPARATOR_CHAR = ';';
@@ -191,7 +191,8 @@ public class StringUtilsTest extends Tes
     public void testConcat_Objects() {
         assertEquals("abc", StringUtils.concat("a", "b", "c"));
         assertEquals("a",   StringUtils.concat(null, "", "a"));
-        assertEquals(null,  StringUtils.concat((String[])null));
+        assertEquals(null,  StringUtils.concat((Object[])null));
+        assertEquals(null,  StringUtils.concat((Object)null)); // varargs version
     }
 
     public void testConcatWith_StringObjects() {
@@ -199,7 +200,8 @@ public class StringUtilsTest extends Tes
         assertEquals("a...b...c", StringUtils.concatWith("...", "a", "b", "c"));
         assertEquals("a",     StringUtils.concatWith("", null, "", "a"));
         assertEquals("a",     StringUtils.concatWith(null, null, "", "a"));
-        assertEquals(null,    StringUtils.concatWith(null, (String[])null));
+        assertEquals(null,    StringUtils.concatWith(null, (Object[])null));
+        assertEquals(null,    StringUtils.concatWith(null, (Object)null)); // varargs version
     }
 
     public void testJoin_Objectarray() {



Mime
View raw message