Re: [PATCH JGIT] Method invokes inefficient new String(String) constructor
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Apr 27, 2009, 23:17 UTC
- Message-ID
- <20090427231701.GL23604@spearce.org>
- In-Reply-To
- <366BBB1215D0AB4B8A153AF047A2878002FCE7E8@dewdfe18.wdf.sap.corp>
"Sohn, Matthias" <matthias.sohn@sap.com> wrote:
> Using the java.lang.String(String) constructor wastes memory because the > object so constructed will be functionally > indistinguishable from the String passed as a parameter. Just use the > argument String directly.
NAK.
Like the Long.valueOf() case this came up before:
http://thread.gmane.org/gmane.comp.version-control.git/113739/focus=113787
-- Shawn.