On Tue, 2004-09-21 at 09:59, [EMAIL PROTECTED] wrote: > rdonkin 2004/09/20 14:59:23 > > Modified: digester build.xml > digester/src/java/org/apache/commons/digester > SetPropertiesRule.java > Log: > Allows exception throwing for mismatches to be switch on. Patch contributed by > Gabriele Carcassi.
I'm worried about this patch. The existing code to actually do the assignment to properties calls BeanUtils.populate(...) which calls BeanUtilsBean.populate(...) which calls BeanUtilsBean.setProperty(...). This patch however uses PropertyUtils.isWriteable to check for the existence of the property. The two code paths are completely different, and I am concerned that they may consider different things to be valid properties. I would prefer to see either: (a) BeanUtils.populate modified to optionally throw an exception if a matching property can't be found, or (b) SetPropertiesRule be modified to use PropertyUtils methods to do the property setting rather than BeanUtils.populate. The latter is probably too risky a change to make; too much chance of breaking existing digester users like Struts. While I very much like this new feature, I am not convinced using PropertyUtils methods to implement it is safe. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
