You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:08:38 UTC

[GitHub] [commons-lang] garydgregory commented on a change in pull request #784: [LANG-1593] Common behavior for StringUtils join APIs when called with char or String delimiter

garydgregory commented on a change in pull request #784:
URL: https://github.com/apache/commons-lang/pull/784#discussion_r699367138



##########
File path: src/test/java/org/apache/commons/lang3/StringUtilsTest.java
##########
@@ -1226,6 +1241,8 @@ public void testJoin_ArrayOfShorts() {
         assertNull(StringUtils.join((short[]) null, SEPARATOR_CHAR, 0, 1));
         assertEquals(StringUtils.EMPTY, StringUtils.join(SHORT_PRIM_LIST, SEPARATOR_CHAR, 0, 0));
         assertEquals(StringUtils.EMPTY, StringUtils.join(SHORT_PRIM_LIST, SEPARATOR_CHAR, 1, 0));
+        assertEquals("1,2", StringUtils.join(SHORT_PRIM_LIST, SEPARATOR));

Review comment:
       @HubertWo 
   The point of String vs char separators is that a String can be longer than one character, so you should test for String separators longer than one character to make sure the right work takes place under the covers.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org