Le 14/03/2012 22:16, sebb a écrit :

In which case, reversing the order would work.
We would just have to document this as a restriction.

Too much burden on the user.


The problem with leaving the validation until later is that it
decouples the cause and effect.
This makes it a bit harder to debug.

It'll break one line bellow the creation of the format in 99.99% of the cases, and the exception thrown is very explicit.


It's also simpler if there is a single validation method.
At present some of the setters also perform validation.

I don't see this as an issue.


BTW, we should probably reject delimiter == DISABLED.

Ok


Also, the DISABLED constant needs to be public (or available via a
public getter) otherwise it's not possible to disable all but the
delimiter.

I'd better use a null value to disable a feature than exposing the DISABLED constant.


Emmanuel Bourg

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

Reply via email to