You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gabriele Kahlout (JIRA)" <ji...@apache.org> on 2011/05/21 18:46:47 UTC

[jira] [Created] (LANG-701) VarArgs Join

VarArgs Join
------------

                 Key: LANG-701
                 URL: https://issues.apache.org/jira/browse/LANG-701
             Project: Commons Lang
          Issue Type: New Feature
          Components: lang.text.*
            Reporter: Gabriele Kahlout
            Priority: Minor


<code>
final String apple = "apple";
        final String banana = "banana";
        final String orange = "orange";

        final String expected = apple +  SPACE + banana + SPACE + orange;
        final String  actual = join(SPACE, apple, banana, orange);

        final int expLength = expected.length();
        final int actLength = actual.length();

        assertEquals(expLength, actLength);

        assertEquals(expected, actual);
</code>

I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (LANG-701) VarArgs Join

Posted by "Gabriele Kahlout (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriele Kahlout updated LANG-701:
----------------------------------

    Attachment: VarArgJoinTest.java

2 methods (one wrapper) for the suggested feature, and a test of each method (all in the same file). I hope you consider including it in StringUtils.

> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.text.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493403#comment-13493403 ] 

Matt Benson commented on LANG-701:
----------------------------------

Sounds good; keeping it short will make it that much easier for users.  :)
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (LANG-701) VarArgs Join

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated LANG-701:
-------------------------------

    Fix Version/s: 3.x

> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.text.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (LANG-701) VarArgs Join

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated LANG-701:
-------------------------------

    Component/s:     (was: lang.text.*)
                 lang.*

> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493342#comment-13493342 ] 

Gary Gregory commented on LANG-701:
-----------------------------------

Let's review what we have:

join(Iterable<?>, char)
join(Iterable<?>, String)
join(Iterator<?>, char)
join(Iterator<?>, String)
join(Object[], char)
join(Object[], char, int, int)
join(Object[], String)
join(Object[], String, int, int)
join(T...)

The first arg is always the collection.

Instead, you want the collection to come last in order to use var args.

Matt's suggestion is sensible, a new API name would avoid confusion. I would use the term "separated" instead of "delimited" though because:
- It is consistent with our current use of "separator" as parameter name in the current method.
- It dovetails nicely with concepts like CSV, Comma Separated Values.

Gary
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493394#comment-13493394 ] 

Gary Gregory commented on LANG-701:
-----------------------------------

Or simply {{joinWith}}.
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) VarArgs Join

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037429#comment-13037429 ] 

Matt Benson commented on LANG-701:
----------------------------------

I would support the addition of new methods to permit varargs usage with StringUtils operations that were available in previous versions of [lang] but whose argument order didn't lend itself to a smooth varargs transition; however IMO these should be _new_, not overloaded methods, i.e. have new names.  I would recommend we use idiom patterns like {{joinDelimitedBy(delim, args...)}}, for this example.

> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.text.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493380#comment-13493380 ] 

Matt Benson commented on LANG-701:
----------------------------------

That makes sense; arguably "delimited" better represents something that is already joined.  Adding a few alternatives, we get:
* {{joinSeparatedBy}}
* {{joinWithSeparator}}
* {{joinSeparatingWith}}
* {{joinUsingSeparator}}
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493275#comment-13493275 ] 

Gary Gregory commented on LANG-701:
-----------------------------------

Simple things first ;)

{quote}
commit -m "[LANG-701] StringUtils join with var args. Add and use SPACE string constant for " "." C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/StringUtils.java
    Sending        C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/StringUtils.java
    Transmitting file data ...
    Committed revision 1407148.
{quote}

Gary
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494155#comment-13494155 ] 

Matt Benson commented on LANG-701:
----------------------------------

The current {{join}} APIs allow Objects for greatest ease.  Often the user may want a quick way to format several objects into a delimited String.  The whole {{joinWith}} approach seems to be feinting in the fluent direction of which several of us, myself included, seem to have become so fond.  Possible approaches include forgetting about the {{boolean}} parameter as Gary suggests; Another possibility could be making it the first argument in the overloaded form in which it appears.  This seems to obscure the semantic intent of the method, however (IMO, boolean arguments often do).  I am inclined to do the following:

* forget about the end separator... I'll come back to this.
* create similar APIs in {{StringUtils}} and {{StrBuilder}} to handle joins with varargs:
** {{StrBuilder#appendAllWith(String separator, T... objects)}} doesn't necessarily make sense; I might therefore prefer to reintroduce {{WithSeparator}} for consistency across both APIs
* if a user needs the end separator as well, just use {{new StrBuilder().appendAllWithSeparator(separator, ...).append(separator)}}

Thoughts?
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (LANG-701) StringUtils join with var args

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory updated LANG-701:
------------------------------

    Summary: StringUtils join with var args  (was: VarArgs Join)
    
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Joerg Schaible (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493807#comment-13493807 ] 

Joerg Schaible commented on LANG-701:
-------------------------------------

bq. the input array should be of Object type, not String, which will cause a stack overflow with the proposed APIs because the boolean arg will go into the Object array. This would not happen with a String array but it would greatly reduce the functionality.
The input array could be at least CharSequence then.
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) StringUtils join with var args

Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493703#comment-13493703 ] 

Gary Gregory commented on LANG-701:
-----------------------------------

I tried code inspired by this patch and the patch needs more work:

- null input causes NPEs
- null separator should map to ""
- test and main code should be separated and submitted in a diff file vs. trunk.
- the input array should be of Object type, not String, which will cause a stack overflow with the proposed APIs because the boolean arg will go into the Object array. This would not happen with a String array but it would greatly reduce the functionality.
- You can start by cloning the join tests. org.apache.commons.lang3.StringUtilsTest

A different approach would be to based the API. on the current APIs.

The need for the endWithSeparator parameter seems of dubious value to me, I think we should implement this and then discuss the addition of endWithSeparator.

Gary
                
> StringUtils join with var args
> ------------------------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) VarArgs Join

Posted by "Gabriele Kahlout (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037440#comment-13037440 ] 

Gabriele Kahlout commented on LANG-701:
---------------------------------------

I agree with you. I'm in favor of the method starting with `join`, for auto-suggest users to easily find it.

> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.text.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (LANG-701) VarArgs Join

Posted by "Gabriele Kahlout (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493068#comment-13493068 ] 

Gabriele Kahlout commented on LANG-701:
---------------------------------------

Updates?
                
> VarArgs Join
> ------------
>
>                 Key: LANG-701
>                 URL: https://issues.apache.org/jira/browse/LANG-701
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gabriele Kahlout
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: VarArgJoinTest.java
>
>
> <code>
> final String apple = "apple";
>         final String banana = "banana";
>         final String orange = "orange";
>         final String expected = apple +  SPACE + banana + SPACE + orange;
>         final String  actual = join(SPACE, apple, banana, orange);
>         final int expLength = expected.length();
>         final int actLength = actual.length();
>         assertEquals(expLength, actLength);
>         assertEquals(expected, actual);
> </code>
> I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira