commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benedikt Ritter <benerit...@googlemail.com>
Subject Re: [csv] Why does CSVFormat provide a validate() method instead of validating parameters passed to its constructor?
Date Thu, 15 Mar 2012 19:26:29 GMT
Am 14. März 2012 22:47 schrieb sebb <sebbaz@gmail.com>:
> On 14 March 2012 21:40, Benedikt Ritter <beneritter@googlemail.com> wrote:
>> Am 14. März 2012 22:33 schrieb Emmanuel Bourg <ebourg@apache.org>:
>>> Le 14/03/2012 22:25, Benedikt Ritter a écrit :
>>>
>>>
>>>> I agree with you on this. However, I think it would be better to tie
>>>> validation to the object creation. Maybe the Builder Pattern like
>>>> shown in Effective Java p. 14-15 is a reasonable solution for this
>>>> case? It would be a bit more verbose, but we can be sure that
>>>> everything will be validated.
>>>
>>>
>>> That's too verbose, please let's keep this simple API.
>>>
>>
>> okay!
>> although, I don't find
>> CSVFormat format =
>> CSVFormat.defaults().withDelimiter('#').withCommentStart('/').build()
>> too verbose ;)
>
> Agree entirely.
>
> And parse and format could perform an implicit build().
>
> It would also allow one to eliminate the additional instance creation.
>

How about you Emmanuel? Could sebb convince you? ;-) How about this:
I'll create a patch and attach it to JIRA. Then we'll have a better
basis for discussion.

>> Bonne nuit!
>
> Gute Nacht ?
>
>> Benedikt
>>
>>> 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
>

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


Mime
View raw message