Revision: 457
http://svn.sourceforge.net/stripes/?rev=457&view=rev
Author: tfenne
Date: 2006-10-27 17:58:20 -0700 (Fri, 27 Oct 2006)
Log Message:
-----------
Merging onto the 1.4 branch the fix for STS-296: failure during null binding of
missing properties should not log a big stack trace at WARN.
Modified Paths:
--------------
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
Modified:
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
===================================================================
---
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
2006-10-28 00:56:50 UTC (rev 456)
+++
branches/1.4.x/stripes/src/net/sourceforge/stripes/controller/DefaultActionBeanPropertyBinder.java
2006-10-28 00:58:20 UTC (rev 457)
@@ -364,6 +364,13 @@
* Invoked whenever an exception is thrown when attempting to bind a
property to an
* ActionBean. By default logs some information about the occurrence, but
could be overridden
* to do more intelligent things based on the application.
+ *
+ * @param bean the ActionBean that was the subject of binding
+ * @param name the ParameterName object for the parameter being bound
+ * @param values the list of values being bound, potentially null if the
error occurred
+ * when binding a null value
+ * @param e the exception raised during binding
+ * @param errors the validation errors object associated to the ActionBean
*/
protected void handlePropertyBindingError(ActionBean bean, ParameterName
name, List<Object> values,
Exception e, ValidationErrors
errors) {
@@ -397,8 +404,8 @@
BeanUtil.setPropertyToNull(name, bean);
}
catch (Exception e) {
- log.warn(e, "Could not set property '", name, "' to null
on ActionBean of",
- "type '", bean.getClass(), "'.");
+ handlePropertyBindingError(bean, new ParameterName(name),
null, e,
+ context.getValidationErrors());
}
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development