Ugo Cei wrote:
Marc Portier wrote:
3/ can getId() ever return null or "" on a widget instance? Can't we carefully asume programming error and allow for the accidental NPE to be thrown
if (id == null || id.equals("")) { throw new FormsConfigurationException("Widget id cannot be null."); }
where FormsConfigurationException extends RuntimeException, of course ;-).
yeah, but this is something that never needs to be catched it really is a programming error, so I find the test for null unesessary and the possible resulting NPE as more then RTE enough to commincate the coding error.
in any case (see other message) there seems to be room for some semantical meaning to "" and null
7/ should validation stop as soon as possible or continue to allow all validation errors to be set?
If you can't make it optional, allow it to continue.
again see other message for the actual various conditions to consider
currently I have the same feeling that "by default we should continue", and actually am not so far to see a real need for making it optional.
-marc= -- Marc Portier http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center Read my weblog at http://blogs.cocoondev.org/mpo/ [EMAIL PROTECTED] [EMAIL PROTECTED]
