[PATCH] Use StringJoiner where appropriate in java.base

Сергей Цыпанов sergei.tsypanov at yandex.ru
Wed Jun 19 13:12:04 UTC 2019


Hello,

in JDK code base we have many places (mainly in j.u.Arrays) where we convert array to String using verbose constructions with StringBuilder.

As far as we have got StringJoiner for a long time we can use it making the code more simple.

Also toString() of AtomicIntegerArray, AtomicLongArray and AtomicReferenceArray partially duplicate logic of corresponding method available in j.u.Arrays and can be replaced with call to delegate.

With kind regards,
Sergey Tsypanov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_sj.txt
Type: text/x-diff
Size: 13363 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20190619/3040463d/patch_sj.txt>


More information about the core-libs-dev mailing list