Replacing deprecated String constructor (original) (raw)
Xueming Shen xueming.shen at oracle.com
Wed Dec 26 15:29:44 UTC 2012
- Previous message: Replacing deprecated String constructor
- Next message: RFR: (jaxp) 8005473 : Warnings compiling jaxp
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Yes, they should be equivalent, except the performance will be slightly different. The "deprecated" one is faster. And in most cases, the new String(..., String charsetName) version is faster than the new String(..., Charset cs) version.
-sherman
On 12/26/2012 9:50 AM, mikhail cherkasov wrote:
Hi All,
I work on removing javac's warring and not sure about how properly replace deprecated String constructors. Is 'new String(data, off, len, StandardCharsets.ISO88591)' equivalent replacement for 'new String(data, 0, off, len)' ? Thanks, Mikhail.
- Previous message: Replacing deprecated String constructor
- Next message: RFR: (jaxp) 8005473 : Warnings compiling jaxp
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]