You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Benedikt Ritter <br...@apache.org> on 2013/07/31 09:43:31 UTC

[CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

2013/7/30 Gary Gregory <ga...@gmail.com>

> On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter <br...@apache.org>
> 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.
>

Thanks for fixing this. I'm still not sure what's the best way to copy
CSVFormats. Currently we have:

public static CSVFormat copy(CSVFormat)

This is a relic of the builder API where we needed the static methods to
create builders. Now I see several options for coping CSVFormats:

- instance method: public CSVFormat copy();
- copy constructor: public CSVFormat(CSVFormat);
- implement java.lang.Cloneable
- leave it as it is (static factory method)

WDYT?

Benedikt


>
> What is next?
>
> Gary
>
>
> >
> > Benedikt
> >
> > [1] https://issues.apache.org/jira/browse/CSV-99
> >
> >
> > 2013/7/24 Benedikt Ritter <br...@apache.org>
> >
> > > Hi Roger,
> > >
> > > tbh I'm not really working on CSV-99. I planed to but then got caught
> up.
> > > But as Gary said, your mail helps in that it points out that people are
> > > waiting for CSV and we really got to finish 1.0. I'm a bit busy this
> week
> > > but I'll try to have a look on sunday.
> > >
> > > Benedikt
> > >
> > >
> > > 2013/7/24 Gary Gregory <ga...@gmail.com>
> > >
> > >> What you are doing now helps ;) I am on my phone now and on vacation
> > >> this week with spotty Internet access, so I won't be much help.
> > >>
> > >> Gary
> > >>
> > >> On Jul 23, 2013, at 14:26, "Roger L. Whitcomb"
> > >> <Ro...@actian.com> wrote:
> > >>
> > >> > Hi guys,
> > >> >    Just wondering how I can help?  We're using Commons CSV and
> > >> > would like to see a release, so I would like to help in any way.  I
> > see
> > >> > the following JIRA issues still open for 1.0:
> > >> > CSV-99:    Benedikt is working on a patch?!
> > >> > CSV-58:    Related to CSV-56; looks like we still need to answer the
> > >> > question about un/escape of TAB, FF, BACKSPACE
> > >> > CSV-35:    at least needs careful documenting, and maybe a bit more
> > >> coding
> > >> > CSV-78:    addressing after fix for CSV-99 is in place
> > >> > CSV-56:    looks like needs research for other formats and how they
> > >> handle
> > >> > \r\n
> > >> > CSV-42:    mostly done?  Not clear what else in the long list is
> still
> > >> > needed/wanted to be done for 1.0
> > >> >
> > >> >    So, without stepping on what others are doing, is there anything
> > >> > NOT being handled that I can look into?
> > >> >
> > >> > Thanks,
> > >> > ~Roger Whitcomb
> > >> >
> > >> > -----Original Message-----
> > >> > From: Benedikt Ritter [mailto:britter@apache.org]
> > >> > Sent: Friday, June 28, 2013 4:57 AM
> > >> > To: Commons Developers List
> > >> > Subject: [CSV] Towards release 1.0
> > >> >
> > >> > Hi,
> > >> >
> > >> > Just to bring CSV up again: JIRA currently has 10 open issues [1].
> > Five
> > >> > with fix version 1.0 and five with 1.x. I'm planning to propose a
> > patch
> > >> > for
> > >> > CSV-99 [2] this weekend. Would be nice if we could manage to fix the
> > >> > other four issues soon. So if you have spare time, just go ahead!
> > >> >
> > >> > Benedikt
> > >> >
> > >> > [1]
> > >> >
> > >>
> > https://issues.apache.org/jira/issues/?jql=project%20%3D%20CSV%20AND%20r
> > >> > esolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC
> > >> > [2] https://issues.apache.org/jira/browse/CSV-99
> > >> >
> > >> >
> > >> > --
> > >> > http://people.apache.org/~britter/
> > >> > http://www.systemoutprintln.de/
> > >> > http://twitter.com/BenediktRitter
> > >> > http://github.com/britter
> > >> >
> > >> >
> ---------------------------------------------------------------------
> > >> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >> > For additional commands, e-mail: dev-help@commons.apache.org
> > >> >
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > >> For additional commands, e-mail: dev-help@commons.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > http://people.apache.org/~britter/
> > > http://www.systemoutprintln.de/
> > > http://twitter.com/BenediktRitter
> > > http://github.com/britter
> > >
> >
> >
> >
> > --
> > http://people.apache.org/~britter/
> > http://www.systemoutprintln.de/
> > http://twitter.com/BenediktRitter
> > http://github.com/britter
> >
>
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition<
> http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Re: [CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

Posted by Emmanuel Bourg <eb...@apache.org>.
Le 31/07/2013 10:15, Benedikt Ritter a écrit :

> Now that I'm thinking about it I don't understand what we need the copy
> method at all. CSVFormats are immutable and can therefore be shared. If I
> want a copy of a format but with a parameter set differently I can simply
> call the withXxx() method and get a new format.


Yes it's immutable, we don't care about copying. Let's drop the copy()
method.

Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

Posted by Gary Gregory <ga...@gmail.com>.
On Jul 31, 2013, at 4:40, Emmanuel Bourg <eb...@apache.org> wrote:

> Le 31/07/2013 10:15, Benedikt Ritter a écrit :
>
>> Now that I'm thinking about it I don't understand what we need the copy
>> method at all. CSVFormats are immutable and can therefore be shared. If I
>> want a copy of a format but with a parameter set differently I can simply
>> call the withXxx() method and get a new format.
>
>
> Yes it's immutable, we don't care about copying. Let's drop the copy()
> method.

Ok, sounds good. We should Javadoc clearly how to "copy and change" a
format then.

Gary
>
> Emmanuel Bourg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [CSV] Duplicating CSVFormats (Was: Re: [CSV] Towards release 1.0)

Posted by Benedikt Ritter <br...@apache.org>.
2013/7/31 Benedikt Ritter <br...@apache.org>

>
>
> 2013/7/30 Gary Gregory <ga...@gmail.com>
>
>> On Fri, Jul 26, 2013 at 2:07 PM, Benedikt Ritter <br...@apache.org>
>> 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.
>>
>
> Thanks for fixing this. I'm still not sure what's the best way to copy
> CSVFormats. Currently we have:
>
> public static CSVFormat copy(CSVFormat)
>
> This is a relic of the builder API where we needed the static methods to
> create builders. Now I see several options for coping CSVFormats:
>
> - instance method: public CSVFormat copy();
> - copy constructor: public CSVFormat(CSVFormat);
> - implement java.lang.Cloneable
> - leave it as it is (static factory method)
>
> WDYT?
>

Now that I'm thinking about it I don't understand what we need the copy
method at all. CSVFormats are immutable and can therefore be shared. If I
want a copy of a format but with a parameter set differently I can simply
call the withXxx() method and get a new format.

I'll have a look tonight an comment on this issue again.


>
> Benedikt
>
>
>>
>> What is next?
>>
>> Gary
>>
>>
>> >
>> > Benedikt
>> >
>> > [1] https://issues.apache.org/jira/browse/CSV-99
>> >
>> >
>> > 2013/7/24 Benedikt Ritter <br...@apache.org>
>> >
>> > > Hi Roger,
>> > >
>> > > tbh I'm not really working on CSV-99. I planed to but then got caught
>> up.
>> > > But as Gary said, your mail helps in that it points out that people
>> are
>> > > waiting for CSV and we really got to finish 1.0. I'm a bit busy this
>> week
>> > > but I'll try to have a look on sunday.
>> > >
>> > > Benedikt
>> > >
>> > >
>> > > 2013/7/24 Gary Gregory <ga...@gmail.com>
>> > >
>> > >> What you are doing now helps ;) I am on my phone now and on vacation
>> > >> this week with spotty Internet access, so I won't be much help.
>> > >>
>> > >> Gary
>> > >>
>> > >> On Jul 23, 2013, at 14:26, "Roger L. Whitcomb"
>> > >> <Ro...@actian.com> wrote:
>> > >>
>> > >> > Hi guys,
>> > >> >    Just wondering how I can help?  We're using Commons CSV and
>> > >> > would like to see a release, so I would like to help in any way.  I
>> > see
>> > >> > the following JIRA issues still open for 1.0:
>> > >> > CSV-99:    Benedikt is working on a patch?!
>> > >> > CSV-58:    Related to CSV-56; looks like we still need to answer
>> the
>> > >> > question about un/escape of TAB, FF, BACKSPACE
>> > >> > CSV-35:    at least needs careful documenting, and maybe a bit more
>> > >> coding
>> > >> > CSV-78:    addressing after fix for CSV-99 is in place
>> > >> > CSV-56:    looks like needs research for other formats and how they
>> > >> handle
>> > >> > \r\n
>> > >> > CSV-42:    mostly done?  Not clear what else in the long list is
>> still
>> > >> > needed/wanted to be done for 1.0
>> > >> >
>> > >> >    So, without stepping on what others are doing, is there anything
>> > >> > NOT being handled that I can look into?
>> > >> >
>> > >> > Thanks,
>> > >> > ~Roger Whitcomb
>> > >> >
>> > >> > -----Original Message-----
>> > >> > From: Benedikt Ritter [mailto:britter@apache.org]
>> > >> > Sent: Friday, June 28, 2013 4:57 AM
>> > >> > To: Commons Developers List
>> > >> > Subject: [CSV] Towards release 1.0
>> > >> >
>> > >> > Hi,
>> > >> >
>> > >> > Just to bring CSV up again: JIRA currently has 10 open issues [1].
>> > Five
>> > >> > with fix version 1.0 and five with 1.x. I'm planning to propose a
>> > patch
>> > >> > for
>> > >> > CSV-99 [2] this weekend. Would be nice if we could manage to fix
>> the
>> > >> > other four issues soon. So if you have spare time, just go ahead!
>> > >> >
>> > >> > Benedikt
>> > >> >
>> > >> > [1]
>> > >> >
>> > >>
>> >
>> https://issues.apache.org/jira/issues/?jql=project%20%3D%20CSV%20AND%20r
>> > >> > esolution%20%3D%20Unresolved%20ORDER%20BY%20priority%20DESC
>> > >> > [2] https://issues.apache.org/jira/browse/CSV-99
>> > >> >
>> > >> >
>> > >> > --
>> > >> > http://people.apache.org/~britter/
>> > >> > http://www.systemoutprintln.de/
>> > >> > http://twitter.com/BenediktRitter
>> > >> > http://github.com/britter
>> > >> >
>> > >> >
>> ---------------------------------------------------------------------
>> > >> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > >> > For additional commands, e-mail: dev-help@commons.apache.org
>> > >> >
>> > >>
>> > >> ---------------------------------------------------------------------
>> > >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> > >> For additional commands, e-mail: dev-help@commons.apache.org
>> > >>
>> > >>
>> > >
>> > >
>> > > --
>> > > http://people.apache.org/~britter/
>> > > http://www.systemoutprintln.de/
>> > > http://twitter.com/BenediktRitter
>> > > http://github.com/britter
>> > >
>> >
>> >
>> >
>> > --
>> > http://people.apache.org/~britter/
>> > http://www.systemoutprintln.de/
>> > http://twitter.com/BenediktRitter
>> > http://github.com/britter
>> >
>>
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition<
>> http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>>
>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>



-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter