StringJoiner: detect or fix delimiter collision?
philip.hodges at bluewin.ch
Tue Jul 23 20:37:54 UTC 2013
The omission of that very complexity is a copious source of bugs that breaks
applications in production, and is extremely useful and interesting to the
black hat community.
It should not be possible to call a joiner without escaping or quoting or
catching an exception or explicitly waiving the complexity. Of course there
will still be some users who roll their own, blissfully unaware of the
existence of StringJoiner. But for those who do discover it, the important
value to add is not convenience, but safety.
Maybe you could even retrofit it to Arrays.toString(), which is exactly such
a toy interface only good for things like logging where delimiter collision
doesn't usually matter.
At the very least can you please cover it in the examples so that people
can't completely overlook it?
View this message in context: http://openjdk.5641.n7.nabble.com/RFR-String-join-StringJoiner-additions-tp127375p145045.html
Sent from the OpenJDK Core Libraries mailing list archive at Nabble.com.
More information about the core-libs-dev