Le 14/03/2012 21:52, Benedikt Ritter a écrit :

the subject of this mail is pretty self-explanatory. Why do we need a
package private validate() method, given the fact, that users can not
create custom instances (constructor is package private)? You could
even argue, that no validation is needed at all, since we are in
control of what formats can be created. However I'd say, the
validation makes sure that we do not unintentionally create invalid
formats. But then validate() can be made private and called at the end
of the constructor.

Because the format could temporarily be in an invalid state. Something like this would break (a bit far fetched, I agree):

CSVFormat.DEFAULT.withDelimiter('#').withCommentStart('/');

Emmanuel Bourg

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to