[
https://issues.apache.org/jira/browse/LANG-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222626#comment-13222626
]
Gary D. Gregory commented on LANG-790:
--------------------------------------
I do not see that [lang] is the place for yet another expression language. Feel
free to discuss it on the mailing list or here of course.
Commons has JXPath, if you do not like XPath, you can try any number of other
facilities. JavaScript is built-in Java 6 and you can pass in Java object to
scripts. BeanShell is still usable but not maintained AFAIK. And a lot more out
there...
IMO, as soon you invent a language today, you'll need more tomorrow, what about
arrays? OK: "x[0].y.z", what about Collections? Maps? What about private
methods? And so on. It just quickly explodes into a full interpreter and that's
out of scope here IMO.
> Null safe Navigation in ObjectUtils
> -----------------------------------
>
> Key: LANG-790
> URL: https://issues.apache.org/jira/browse/LANG-790
> 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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira