commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gokul Nanthakumar C (Commented) (JIRA)" <>
Subject [jira] [Commented] (LANG-790) Null safe Navigation in ObjectUtils
Date Sun, 18 Mar 2012 06:32:53 GMT


Gokul Nanthakumar C commented on LANG-790:

Thanks Gary for your valuable input and time.

Javascript in Java, cool, but I like to have an option in Java, As I commented earlier, if
that is the choice I can use any JVM languages to achieve this, we can use Groovy to achieve
this and many more.

You may choose to call it is as Interpreter, but for me it is just an utility method for easy

Private method support not necessarily required as we can not access them any way in normal
> Null safe Navigation in ObjectUtils
> -----------------------------------
>                 Key: LANG-790
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>            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:!default.jspa
For more information on JIRA, see:


View raw message