commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LANG-790) Null safe Navigation in ObjectUtils
Date Wed, 12 Sep 2012 05:48:09 GMT

     [ https://issues.apache.org/jira/browse/LANG-790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell updated LANG-790:
-------------------------------

    Component/s: lang.*
    
> Null safe Navigation in ObjectUtils
> -----------------------------------
>
>                 Key: LANG-790
>                 URL: https://issues.apache.org/jira/browse/LANG-790
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Gokul Nanthakumar C
>
> Adding a method for null safe navigation of objects will be very helpful. for example
a method like
> ObjectUtils.getValue(Object obj, String "path", String defaultValue); 
> ex :ObjectUtils.getValue(myObject, "x.y.z", "default");
> it will navigate in the myObject like myObject.getX().getY().getZ(), if any thing in
the path is null (x,y or z), it will return the default value.
> It will be really useful, it is like null safe navigation in groovy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message