RFR: 6206780 (str) Forwarding append methods in String{Buffer, Builder} are inconsistent
Martin Buchholz
martinrb at google.com
Mon Oct 1 21:46:22 UTC 2012
On Mon, Oct 1, 2012 at 2:22 PM, Jim Gish <jim.gish at oracle.com> wrote:
> Alan & Chris,
>
> However, let me propose something else. How about /all /the methods in
> StringBuffer be synchronized? Although this is not strictly necessary, it
> works because reentrant synchronization is allowed.
Reentrant lock acquisition is not free. In core libraries like
StringBuffer we should prefer the lesser evil of code duplication to the
loss of performance.
More information about the core-libs-dev
mailing list