[ http://issues.apache.org/jira/browse/BEANUTILS-261?page=comments#action_12449238 ] Henri Yandell commented on BEANUTILS-261: -----------------------------------------
This seems like it wouldn't be a good thing to do. Anyone have any thoughts? > Return null but not throw NestedNullException if the nested property is null > ---------------------------------------------------------------------------- > > Key: BEANUTILS-261 > URL: http://issues.apache.org/jira/browse/BEANUTILS-261 > Project: Commons BeanUtils > Issue Type: New Feature > Components: Bean / Property Utils > Reporter: Jiemiao Shi > > Can provide a method in PropertyUtils to get nested properties without > throwing a NestedNullException when any of the no-end property is null? > example: > /* code begin */ > Employee employee=... > emplyee.setAddress(null); > String street=(String) PropertyUtils.getNestedProperty(employee, > "address.street");// #### > /* code end */ > The statement #### will throws a NestedNullException, but return null will > make it easier to write code in some situation. So can please provide a > method only return null? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]