commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-701) StringUtils join with var args
Date Mon, 17 Nov 2014 18:18:34 GMT

    [ https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14214930#comment-14214930
] 

ASF GitHub Bot commented on LANG-701:
-------------------------------------

GitHub user jamessawle opened a pull request:

    https://github.com/apache/commons-lang/pull/38

    LANG-701 Added new joinWith method to support varargs

    ...rom previous join methods, but have added ExpectedException rule to allow for better
exception handling in tests

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jamessawle/commons-lang LANG-701

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/38.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #38
    
----
commit fad36aec29ce9eae5667ecc13369b986b3d8c82d
Author: James Sawle <jamessawle@hotmail.com>
Date:   2014-11-17T18:15:14Z

    LANG-701 Added new joinWith method to support varargs. Have used logic from previous join
methods, but have added ExpectedException rule to allow for better exception handling in tests

----


> 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: Review Patch
>
>         Attachments: VarArgJoinTest.java
>
>
> {code:java}
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message