Currently if you call PropertyUtils.getProperty with a chain of properties,
like "painting.name" and a part of the chain is null you get
UnresolvablePathException("Null value in the middle of the path…").  I
believe it was done this way to match
org.apache.commons.beanutils.BeanUtils.getNestedProperty

To me this is undesirable - I'd rather have it just return null and stop
evaluation.  That's how key value coding works in WebObjects.  I just have
trouble seeing where an exception would be preferable to returning null.
 I'd be interested in either changing the behavior or adding an optional
boolean flag that controls whether an exception is thrown or not.  On the
other hand, it's simple enough to create my own static method that wraps
this call and catches the exception.

Does anyone else have an opinion on this?

John

Reply via email to