On husted.com, Ted Husted wrote:
                Do not check for null ActionForm beans in your Actions
If an Action expects an ActionForm bean, then its API contact with the ActionMappings 
should require that this bean, or a subclass, be named in the ActionMapping. The 
Actions contact wit the controller is that it will always instantiate the bean before 
the Action is called. If either contact is broken, the application should expose a 
null pointer exception so that the problem is fixed and the misunderstanding resolved. 
Whether an Action expects an ActionForm bean should be specified in its Javadoc.

Now I'm wondering if 'contact' was a type and what he meant was 'contract', that is, 
in the sense of an API contract or implied constrain, pre-condition.

(You out there Ted?)

Anyway, this seems like a good idea. I'm always complaining that exceptions are often 
overused or misused in Java, and this seems like a good use: let the exception raise 
havoc, in order to inform you of a really exceptional condition, and one that should 
be exposed if it exists.



Steve Carter
Sr. Software Engineer
Swift Rivers
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to