Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 87361 invoked from network); 22 May 2006 12:46:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 May 2006 12:46:12 -0000 Received: (qmail 79296 invoked by uid 500); 22 May 2006 12:46:09 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 79208 invoked by uid 500); 22 May 2006 12:46:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 79195 invoked by uid 99); 22 May 2006 12:46:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2006 05:46:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of nicolas.deloof@capgemini.com designates 194.3.247.82 as permitted sender) Received: from [194.3.247.82] (HELO mxepar01.capgemini.com) (194.3.247.82) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 May 2006 05:46:07 -0700 Received: from mxipar01.capgemini.com (prvmta2 [194.3.224.82]) by mxepar01.capgemini.com (8.13.6/8.13.6) with ESMTP id k4MCjjbi009270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 22 May 2006 14:45:45 +0200 (MEST) Received: from prvmta2.capgemini.com (localhost [127.0.0.1]) by mxipar01.capgemini.com (8.13.6/8.13.6) with ESMTP id k4MCjiVf029973 for ; Mon, 22 May 2006 14:45:44 +0200 (MEST) Received: from pasteur2.capgemini.fr (smtp.capgemini.fr [10.67.1.90]) by prvmta2.capgemini.com (8.13.6/8.13.6) with ESMTP id k4MCjiwY029964 for ; Mon, 22 May 2006 14:45:44 +0200 (MEST) Received: from pasteur.capgemini.fr (localhost [127.0.0.1]) by pasteur2.capgemini.fr (8.12.10/8.12.10) with ESMTP id k4MCjiXn010598 for ; Mon, 22 May 2006 14:45:44 +0200 (MEST) Received: from [10.67.188.66] ([10.67.188.66]) by pasteur.capgemini.fr (8.12.10/8.12.10) with ESMTP id k4MCjiTe010577 for ; Mon, 22 May 2006 14:45:44 +0200 (MEST) Message-ID: <4471B275.8080108@capgemini.fr> Date: Mon, 22 May 2006 14:45:41 +0200 From: Nicolas De Loof User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [csv] j2se1.3 compatibility / header line writer References: <446B0E07.2040606@netcetera.ch> <4471AB30.1060906@mvdb.net> <25aac9fc0605220539n6cf4db84x299a1829e6a590a9@mail.gmail.com> In-Reply-To: <25aac9fc0605220539n6cf4db84x299a1829e6a590a9@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >> It is supported in jdk1.3.. Just cast the stringbuffer passed in to >> an object, so like >> StringBuffer.append((Object) StringBuffer)). Much more efficient than >> an if... >> > > Surely a StringBuffer is already an Object? > > Or am I missing something here? > StringBuffer has a new method in Java 1.4 to append another Stringbuffer without invoking it's toSring() method. Code that uses StringBuffer.append(stb) and compiled by a JDK 1.4 will not work on Java 1.3. I miself recommand Using "StringBuffer.append(stb.toString())" that looks better than an apparently useless (Object) cast : checkstyle or IDE may warn for unecessary cast. Nico. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org