Re: StringBuffer vs. StringBuilder

From: Stephen Nelson <stephen(at)eccostudio(dot)com>
To: Frederik Wiers <frederik(dot)wiers(at)gmail(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: StringBuffer vs. StringBuilder
Date: 2014-01-20 14:07:53
Message-ID: CAHpHs3nJ-b5q7Ov0A5v=+GVSTvF3Gk-dV9zviUE3r0MjhrLUng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, Jan 20, 2014 at 12:37 AM, Frederik Wiers
<frederik(dot)wiers(at)gmail(dot)com>wrote:

> And I can not think of a reason to use a StringBuffer if it is just used
> locally in a method to build a String.
>
>
It's probably historical based on the fact that StringBuilder was
introduced in JDK 1.5 and pgjdbc is/was still supporting JDK 1.4. It's
worth re-evaluating if 1.4 should be supported and then a number of
optimisations could be introduced.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Charles Pritchard 2014-01-20 23:51:57 Re: revisiting unix domain sockets
Previous Message Frederik Wiers 2014-01-20 00:37:51 StringBuffer vs. StringBuilder