Re: [CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
On Tue, Jul 30, 2013 at 5:47 PM, Emmanuel Bourg wrote: > Le 30/07/2013 23:24, Gary Gregory a écrit : > > > Yeah, that's too clever IMO. I expected the same behavior WRT record > > reading with the only difference being if I let the parser guess or not. > > Too clever? I didn't feel like I designe

Re: [CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
On Tue, Jul 30, 2013 at 5:29 PM, Emmanuel Bourg wrote: > Le 30/07/2013 23:26, Gary Gregory a écrit : > > And another thing: internally, the header should be a Set, not a > > String[]. I plan on fixing that later too. > > Why should it be a set? Is there an impact on the performance? > Well, I di

Re: [CSV] Headers and the first record

2013-07-30 Thread Emmanuel Bourg
Le 30/07/2013 23:24, Gary Gregory a écrit : > Yeah, that's too clever IMO. I expected the same behavior WRT record > reading with the only difference being if I let the parser guess or not. Too clever? I didn't feel like I designed a rocket with this feature though :) That's an important feature

Re: [CSV] Headers and the first record

2013-07-30 Thread Emmanuel Bourg
Le 30/07/2013 23:26, Gary Gregory a écrit : > And another thing: internally, the header should be a Set, not a > String[]. I plan on fixing that later too. Why should it be a set? Is there an impact on the performance? Emmanuel Bourg

Re: [CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
And another thing: internally, the header should be a Set, not a String[]. I plan on fixing that later too. Gary On Tue, Jul 30, 2013 at 5:24 PM, Gary Gregory wrote: > On Tue, Jul 30, 2013 at 5:15 PM, Emmanuel Bourg wrote: > >> I haven't checked the current code, but the intended behavior was:

Re: [CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
On Tue, Jul 30, 2013 at 5:15 PM, Emmanuel Bourg wrote: > I haven't checked the current code, but the intended behavior was: > > - no args: the first record defines the header and is not returned when > iterating > > - args: the header is defined independently of the data, all the records > are re

Re: [CSV] Headers and the first record

2013-07-30 Thread Emmanuel Bourg
I haven't checked the current code, but the intended behavior was: - no args: the first record defines the header and is not returned when iterating - args: the header is defined independently of the data, all the records are returned when iterating Emmanuel Bourg Le 30/07/2013 22:23, Gary Gre

RE: [CSV] Towards release 1.0

2013-07-30 Thread Roger L. Whitcomb
As I see it there were still some issues related to the escape character mechanism and particularly escaping of carriage return and newline (\r \n) and how these are handled. Seemed like there needs to be a consensus of what the "standard" behavior is/should be. Issues CSV-35

Re: [CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
Actually, if you use withHeader(), no args, you _cannot_ get back the first record, so that makes skipHeader=false not possible without making the parser track the first record separately. In the interest of simplicity, I am going to make it simple: if you use withHeader of any kind, then the firs

Re: [CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
Hi All: I see now, the behavior is different depending on what you pass to withHeader()! Confusing indeed. If you call withHeader with Strings, the first line is not read and it is returned as a record. If you call withHeader with no arguments, the first line _is_ read and it is NOT returned as

[CSV] Headers and the first record

2013-07-30 Thread Gary Gregory
Hi All: I have Excel files with headers. So I use withHeaders() of course to map the headers. When I call parser.iterator().next(), the first record is the header record, not data. I always have to skip this first line since it is not data. I wonder if: 1) We should automatically skip the head

Re: [CSV] Towards release 1.0

2013-07-30 Thread Gary Gregory
On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter wrote: > Hi, > > I've attached a patch to CSV-99 [1]. Feedback is welcome! If nobody > objects, I'll apply this patch on sunday. > > This one is done. What is next? Gary > > Benedikt > > [1] https://issues.apache.org/jira/browse/CSV-99 > > > 20

Re: [pool] 2.0 factory interfaces WAS: Re: svn commit: r1506685 - in /commons/proper/pool/trunk/src: main/java/org/apache/commons/pool2/ main/java/org/apache/commons/pool2/impl/ test/java/org/apache/

2013-07-30 Thread Phil Steitz
I have started working on this. Should have something to commit at least for GOP in the next day or two. Phil On 7/29/13 10:56 AM, Phil Steitz wrote: > On 7/24/13 1:06 PM, Mark Thomas wrote: >> On 24/07/2013 21:01, ma...@apache.org wrote: >>> Author: markt >>> Date: Wed Jul 24 20:01:34 2013 >>>

Re: svn commit: r1508472 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java

2013-07-30 Thread Benedikt Ritter
2013/7/30 > Author: ggregory > Date: Tue Jul 30 14:44:48 2013 > New Revision: 1508472 > > URL: http://svn.apache.org/r1508472 > Log: > [CSV-99] Revert Builder implementation in CSVFormat. > > Modified: > > commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVFormat.java > > Modified: