Re: [csv] j2se1.3 compatibility / header line writer

2006-05-23 Thread Henri Yandell
Probably worth checking if it's performant or not first :) I just got my laptop back after a couple of weeks on a spare, so ready to get JProfiler up and running for testing. Maybe a good time to check YourKit out too. Hen On 5/22/06, sebb [EMAIL PROTECTED] wrote: OK, I see. Whatever method

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread Martin van den Bemt
urs hardegger wrote: netcetera suggests the following changes to commons csv: 1) CSVPartser.java: StringBuffer.append(StringBuffer) is no supported in JDK 1.3. It would be a pitty to have an incompatibility because of this issue. In case this is performance critical,

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread Nicolas De Loof
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

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread sebb
On 22/05/06, Nicolas De Loof [EMAIL PROTECTED] wrote: 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

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread Martin van den Bemt
Nicolas De Loof wrote: 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

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread Nicolas De Loof
compiled on a JDK 1.4, sb1.append(sb2) will not work on java 1.3 JRE : it requires append(StringBuffer). compiled on a JDK 1.3, it is equivalent to a toString() call as append(Object) method is used by compiler. It will work on all JRE but will be non-optimal on JDK 1.4 Only two versions

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread Martin van den Bemt
That just works when compiling on jdk1.3 and will not work on jdk1.3 when compiled on jdk1.4 To prevent this, you specifically have to cast it to object to say use the append which takes an object or as Nicolas suggested a toString(), but the last one is not my favorite solution.. Mvgr,

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-22 Thread sebb
OK, I see. Whatever method is chosen, it's worth documenting the reasons for the strange coding... If a release is being built to support 1.3 and above, it might be worth using the 1.3 compiler - or at least using the 1.3 jars. S. On 22/05/06, Martin van den Bemt [EMAIL PROTECTED] wrote: That

Re: [csv] j2se1.3 compatibility / header line writer

2006-05-17 Thread Henri Yandell
Any chance you could submit these in Jira? http://issues.apache.org/jira to the Commons Sandbox project. Makes it easier to manage and not have things get lost; and a better public history for showing active contributors. Hen On 5/17/06, urs hardegger [EMAIL PROTECTED] wrote: netcetera