On Mon, Feb 02, 2004 at 09:51:23PM +0100, Joerg Heinicke wrote: > Regularly I have a problem with NPEs in binding when the binding > references an ID which does not exist in the definition. The NPE is > thrown in ValueJXPathBinding.java, line 129. What I want to add is to > throw an Exception before depending on a null test on the widget. > Therefore the method should declare that it throws a checked exception. > > Has anybody any objections against the change of > public abstract void doLoad(Widget frmModel, JXPathContext jxpc); > to > public abstract void doLoad(Widget frmModel, JXPathContext jxpc) throws > BindingException; > in org.apache.cocoon.woody.binding.JXPathBindingBase.java, line 149?
No objection here, just so you know somebody is listening. BTW, I think there should be a check in each binding to make sure the widget is of the required type. Perhaps JXPathBindingBase should supply a method that the bindings could call to perform this check? --Tim Larson
