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

2015-05-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/79#issuecomment-99172436
  
Thank you!


 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
Assignee: Benedikt Ritter
Priority: Minor
 Fix For: 3.5

 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)


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

2015-05-05 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user asfgit closed the pull request at:

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


 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)


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

2015-05-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/79#issuecomment-98854763
  

[![Coverage 
Status](https://coveralls.io/builds/2484881/badge)](https://coveralls.io/builds/2484881)

Coverage decreased (-0.0%) to 93.35% when pulling 
**155cec1085f9bd5383241e4c93fb40117081aaba on rightmove:LANG-701** into 
**1cb5573ada7dc7ec240fca6afe4eeb6e2c793d8e on apache:master**.



 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)


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

2015-05-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user coveralls commented on the pull request:

https://github.com/apache/commons-lang/pull/79#issuecomment-98854761
  

[![Coverage 
Status](https://coveralls.io/builds/2484881/badge)](https://coveralls.io/builds/2484881)

Coverage decreased (-0.0%) to 93.35% when pulling 
**155cec1085f9bd5383241e4c93fb40117081aaba on rightmove:LANG-701** into 
**1cb5573ada7dc7ec240fca6afe4eeb6e2c793d8e on apache:master**.



 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)


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

2015-05-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

GitHub user jamessawle opened a pull request:

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

LANG-701 - Added new joinWith method to support varargs



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

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

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

https://github.com/apache/commons-lang/pull/79.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 #79


commit 155cec1085f9bd5383241e4c93fb40117081aaba
Author: jamessawle jamessa...@hotmail.com
Date:   2015-05-04T21:19:18Z

LANG-701 - Added new joinWith method to support varargs




 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)


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

2015-05-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user jamessawle closed the pull request at:

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


 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)


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

2015-05-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user jamessawle commented on the pull request:

https://github.com/apache/commons-lang/pull/38#issuecomment-98852369
  
Created new pull request


 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)


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

2015-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

GitHub user jamessawle reopened 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/rightmove/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 jamessa...@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

commit 6f13931c0581a766d788d94ce529b4e64f63cef2
Author: James Sawle jamessa...@hotmail.com
Date:   2014-11-18T11:11:56Z

LANG-701 Made changes based upon comments from pull request

commit 144e742d1428c436facba2611d49f5af272f9aa2
Author: James Sawle jamessa...@hotmail.com
Date:   2014-12-15T12:23:40Z

LANG-701 Made changes suggested in JIRA comment. Added extra Javadoc with 
examples, and handle nulls in the same way as 'join(Iterable, String)'

commit 9520af68f88bccd6f9abe8098b518f44a70764fb
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-09T08:52:18Z

LANG-701 - Remove Objects.toString and ExpectedException from code

commit 24385a5313d92da95b92f72881facb9c757be138
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-09T08:53:52Z

LANG-701 - Remove Objects.toString and ExpectedException from code

commit a9fac9b577dd4c7d3f21d05ef679937a9b741c4d
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-09T08:59:07Z

Merge branch 'trunk' into LANG-701

commit 21b14a2a353a5ac0fb37d06eb5898d19e001eacd
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-15T12:40:46Z

LANG-701 - Fixed issue where null value in varargs would cause null pointer 
exception

commit 3506be5b26fcf5723dcc80c77792f2313fc40a76
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-15T12:43:40Z

Merge remote-tracking branch 'remotes/upstream/trunk' into LANG-701

commit c5f22fc411a531b235d9b3ec134cf739d9c309d4
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-23T11:50:56Z

LANG-701 - Fix issue with Idea auto-formatting code

commit 853da6a74222928745ad2e30573aad6dc21f5cfc
Author: jamessawle jamessa...@hotmail.com
Date:   2015-04-23T11:59:49Z

LANG-701 - Fix issue with using tabs instead of spaces




 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)


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

2015-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user britter commented on the pull request:

https://github.com/apache/commons-lang/pull/38#issuecomment-96796617
  
@jamessawle Commons Lang has been migrated from svn to git. Because of this 
the main branch has been renamed to 'master'. Can you please rebase your work 
against the master branch? Thank you!


 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)


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

2015-04-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on LANG-701:
-

Github user asfgit closed the pull request at:

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


 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)


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

2015-04-18 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-701:
--

Hello [~jamessawle],

I've reviewed the changes on github. Could you please clean up the PR so that 
is does not contain tab characters and no rearragement of code?

Thank you!

 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)


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

2015-04-18 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-701:
--

Hello [~jamessawle],

I've reviewed the changes on github. Could you please clean up the PR so that 
is does not contain tab characters and no rearragement of code?

Thank you!

 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)


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

2015-04-09 Thread James Sawle (JIRA)

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

James Sawle commented on LANG-701:
--

The changes have been made.

 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)


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

2015-04-08 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-701:
--

Thank you!

 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)


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

2015-04-07 Thread James Sawle (JIRA)

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

James Sawle commented on LANG-701:
--

Sorry took a new job in October and have been trying to get up to speed with 
different technologies.

Whilst I totally understand that the messages are not public APIs as not 
documented, as they are returned and visible to the end user, they are as good 
as public APIs, and possibly worse as there is no documentation when they 
change. I am not suggesting that we document them, nor that we never change 
them. But if they are asserted over, then if they are changed, then the tests 
will need to be changed; and this is more likely to be highlighted in a code 
review and lead to stable exception messages. Cases where I think we should be 
asserting even if we don't on general messages is where there is dynamic data 
within the message.

I suppose my thought is, that for a library that prides itself on stability, it 
seems a way of suring up hidden API that every library has. But I understand 
this is outside of the scope, so will remove it from the pull request; update 
the request to be up-to-date with master and bring this up in a separate issue 
with references.

 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)


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

2014-12-26 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-701:
--

Hello [~jamessawle],

I like your enthusiasm :)

{quote}
I will remove the check on the message for now, but would like to create and 
issue for adding them to the public API as can be as important as the type of 
exception, especially when generic exception types are used. Even if we do not 
publicly expose the messages, the changes should be considered regression 
unless consciously considered.
{quote}

I don't understand what you're trying to achieve. Should we never change 
exception messages once we have released them? How do we make sure this doesn't 
happen? For API changes we use clirr. I'm not aware of of tool that can do the 
same think like clirr does for messages of exceptions thrown from APIs. 
Relying on exception messages is bad practice. I don't see a reason to impose 
yet another restriction on how we can evolve our libraries, just to make sure 
bad code won't break. My feeling it, that we should invest our energy into more 
important things (like bugfixes and new features).

{quote}
I would also like to keep the ExpectedException within the pull request as it 
is the recommended standard for JUnit over the annotation method. Should we not 
use best practice for one part as not the standard across the rest of the API, 
especially as it is an implementation detail?
{quote}

I've only found https://github.com/junit-team/junit/wiki/Exception-testing 
which says that annotation based exception testing is okay for simple use 
cases. At the moment we just have a simple use case, because we're only 
interested in the type of exception. Can you please point me to the resource 
you have taken this recommendation from?

I'd rather like to see this PR without the ExpectedExcetion. If you really want 
to go that way, you should bring this up on the dev ML and here what other devs 
think about this.

bq. I will also make the change to remove the dependency on Java 7 libraries as 
well as the use of spaces instead of tabs.

Thank you and keep up the good work! :)

 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)


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

2014-12-25 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-701:
--

{quote}
The issue I have with the @Expected annotation, is that there is no regression 
testing for the messages; which it is not uncommon to see people assert over in 
their code (I know not good practice but people still do it). I am willing as 
part of this or another issue to migrate the entire test class to this 
structure, and/or as lang4 do the rest of the codebase.
{quote}

The messages of exceptions are not part of the API we provide. It is just for 
informational purposes. If you really have the spare time to work though all 
the tests and change this, I won't hinder you. But my feeling is, that there 
are much more important things than this :-)

 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)


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

2014-12-25 Thread James Sawle (JIRA)

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

James Sawle commented on LANG-701:
--

Ok...

I will remove the check on the message for now, but would like to create and 
issue for adding them to the public API as can be as important as the type of 
exception, especially when generic exception types are used. Even if we do not 
publicly expose the messages, the changes should be considered regression 
unless consciously considered.

I would also like to keep the ExpectedException within the pull request as it 
is the recommended standard for JUnit over the annotation method. Should we not 
use best practice for one part as not the standard across the rest of the API, 
especially as it is an implementation detail?

I will also make the change to remove the dependency on Java 7 libraries as 
well as the use of spaces instead of tabs.

 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)


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

2014-12-16 Thread James Sawle (JIRA)

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

James Sawle commented on LANG-701:
--

I have updated the pull request to handle nulls the same as 'join(Iterable, 
String)' and improved the Javadoc.

 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)


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

2014-12-14 Thread Benedikt Ritter (JIRA)

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

Benedikt Ritter commented on LANG-701:
--

Hello James,

nice idea to use ExpectedException for testing the exception's message. However 
we do not use it anywhere else in the code, so it would be a bit strange to 
have this one test that uses it. I'm fine with just making sure the expected 
exception is thrown.

The {{join(Iterable, String)}} method treats null as empty string. Your 
implementation of {{joinWith(String, Object...)}} writes null to the result 
if the varargs array contains null entries. Would be better if both methods 
behave the same way.

It would be helpful to add a list of example to the JavaDoc of your method, so 
that users can see easily how the new method behaves for different inputs.

br,
Benedikt

 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)


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

2014-12-14 Thread James Sawle (JIRA)

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

James Sawle commented on LANG-701:
--

I will have a look at the null input value today or this evening and make any 
relevant change and add suitable JavadocI am willing to go through the rest of 
the class (and any others I touch) and migrate all to the new format.

The issue I have with the @Expected annotation, is that there is no regression 
testing for the messages; which it is not uncommon to see people assert over in 
their code (I know not good practice but people still do it). I am willing as 
part of this or another issue to migrate the entire test class to this 
structure, and/or as lang4 do the rest of the codebase.

 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)


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

2014-12-08 Thread James Sawle (JIRA)

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

James Sawle commented on LANG-701:
--

Are there any more comments on the pull request - 
https://github.com/apache/commons-lang/pull/38.

 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)


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

2014-11-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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 jamessa...@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)


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

2014-07-30 Thread Josh Cain (JIRA)

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

Josh Cain commented on LANG-701:


I really like the first option - looked for it at work today where I needed to 
specify a custom separator and it was not there.  Is anyone actively looking at 
this?  If not, I'd be happy to pick this one up.

 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.2#6252)


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

2012-11-09 Thread Matt Benson (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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] [Commented] (LANG-701) StringUtils join with var args

2012-11-08 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

2012-11-08 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

2012-11-08 Thread Matt Benson (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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

2012-11-08 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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) StringUtils join with var args

2012-11-08 Thread Matt Benson (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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] [Commented] (LANG-701) StringUtils join with var args

2012-11-08 Thread Gary Gregory (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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) StringUtils join with var args

2012-11-08 Thread Joerg Schaible (JIRA)

[ 
https://issues.apache.org/jira/browse/LANG-701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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