Re: StringBuffer vs. StringBuilder - Mailing list pgsql-jdbc

From Stephen Nelson
Subject Re: StringBuffer vs. StringBuilder
Date
Msg-id CAHpHs3nJ-b5q7Ov0A5v=+GVSTvF3Gk-dV9zviUE3r0MjhrLUng@mail.gmail.com
Whole thread Raw
In response to StringBuffer vs. StringBuilder  (Frederik Wiers <frederik.wiers@gmail.com>)
List pgsql-jdbc
On Mon, Jan 20, 2014 at 12:37 AM, Frederik Wiers <frederik.wiers@gmail.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.

pgsql-jdbc by date:

Previous
From: Frederik Wiers
Date:
Subject: StringBuffer vs. StringBuilder
Next
From: Charles Pritchard
Date:
Subject: Re: revisiting unix domain sockets