RFR: String.join(), StringJoiner additions (original) (raw)

Mike Duigou mike.duigou at oracle.com
Wed Apr 17 19:15:57 UTC 2013


String::

line 1253: This should use {@code } rather than . I think regular spaces are OK as well.   seems inappropriate.

lines 2425/2467: elements may not be null either.

I can tell you (or maybe it's just me) are itching to change :

for (CharSequence cs: elements) { 2477 joiner.add(cs); 2478 }

to:

elements.forEach(joiner::add);

StringJoiner::

 {@code 
... 
}

for code samples.

On Apr 11 2013, at 15:33 , Jim Gish wrote:

Please review http://cr.openjdk.java.net/~jgish/Bugs-5015163-7175206-7172553/ <http://cr.openjdk.java.net/%7Ejgish/Bugs-5015163-7175206-7172553/>

These are changes that we made in lambda that we're now bringing into JDK8. I've made a couple of additions - making StringJoiner final and adding a couple of constructors to set the emptyOutput chars. Thanks, Jim -- Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304 Oracle Java Platform Group | Core Libraries Team 35 Network Drive Burlington, MA 01803 jim.gish at oracle.com



More information about the core-libs-dev mailing list