You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Misha Stankovic <mi...@optusnet.com.au> on 2005/04/03 08:34:56 UTC
Jexl if statement
Hi,
Could someone clarify for me please whether the jexl library supports if
statements.
It appears that theere is a placeholder for this statement in the language
syntax, but the statement does not seem to be implemented.
Whenever I tried creating expressions with the syntax
if( expression ) statement;
I get an exception:
Invalid Expression: neither Reference nor Expression
at
org.apache.commons.jexl.ExpressionFactory.createNewExpression(ExpressionFact
ory.java:134)
at
org.apache.commons.jexl.ExpressionFactory.createExpression(ExpressionFactory
.java:94)
at test.JexlTest.testIfElse(JexlTest.java:53)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
at junit.extensions.TestSetup.run(TestSetup.java:23)
at test.JexlTest.main(JexlTest.java:82)
Thanks
Misha
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: Jexl if statement
Posted by Dion Gillard <di...@gmail.com>.
On Apr 3, 2005 4:34 PM, Misha Stankovic <mi...@optusnet.com.au> wrote:
> Hi,
>
> Could someone clarify for me please whether the jexl library supports if
> statements.
It does not.
> It appears that theere is a placeholder for this statement in the language
> syntax, but the statement does not seem to be implemented.
Correct. The grammar has it defined, but it is not implemented in the code.
> Whenever I tried creating expressions with the syntax
>
> if( expression ) statement;
>
> I get an exception:
>
> Invalid Expression: neither Reference nor Expression
> at
> org.apache.commons.jexl.ExpressionFactory.createNewExpression(ExpressionFact
> ory.java:134)
> at
> org.apache.commons.jexl.ExpressionFactory.createExpression(ExpressionFactory
> .java:94)
> at test.JexlTest.testIfElse(JexlTest.java:53)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
> at junit.extensions.TestSetup.run(TestSetup.java:23)
> at test.JexlTest.main(JexlTest.java:82)
>
> Thanks
> Misha
--
http://www.multitask.com.au/people/dion/
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org