RFR: 8017231: Add StringJoiner.merge

Alan Bateman Alan.Bateman at oracle.com
Wed Jul 3 16:09:30 UTC 2013

On 03/07/2013 09:03, Henry Jen wrote:
> Hi,
> Please review a simple addition of StringJoiner.merge method. This is
> useful to combine StringJoiners used in parallel doing joining works.
> The webrev can be found at
> http://cr.openjdk.java.net/~henryjen/ccc/8017231.0/webrev/
> Also included is a little clean up for StringJoinerTest.
> Cheers,
> Henry
Is this named "merge" to disambiguate it from "add"? Just wondering.

A minor point but I think the wider javadoc tends to use "the given XYZ" 
when referring to parameters rather than the "the supplied XYZ".

Typo "nonempty" -> "non-empty".

I assume you meant to name the local otherBuilder rather than an 
otherBuffer. Also is there any reason not to use 
append(CharSequence,int,int) here?

The test looks good to me, I guess an alternative would be to just add 
to the existing test so that we have one test for StringJoiner (it 
doesn't matter either way).


More information about the core-libs-dev mailing list