Hi,

On 6/19/19 2:12 PM, Сергей Цыпанов wrote:

> 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.

I agree this makes the code apparently simpler, but it's not clear
that it's any faster, and there is always a cost in any large code
base associated with changes. This "churn", as it is called, has a
long-term cost for maintainers. Also, there is some risk in any part
of the core library that might be used when bootstrapping the system.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

Reply via email to