commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [jexl] Test for existence
Date Fri, 02 Mar 2012 17:54:23 GMT
On 2 March 2012 11:48, henrib <henrib@apache.org> wrote:
> Hi Jeff,
> Using the 'elvis' operator should allow what you seek; in strict mode, it
> allows non existent vars expressions to be handled without errors. Something
> like 'foo?:false' might do for you use case.
> Check http://commons.apache.org/jexl/reference/syntax.html on ternary
> conditional.

However the elvis operator does not distinguish undefined from null and false.

It might still be worth having a "defined" function as well?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message