commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject Re: [JELLY, JEXL] Inconsistency in evaluation of dot separated variables
Date Fri, 03 Oct 2003 06:17:38 GMT
Bug!
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/


Semir Patel <semir@us.ibm.com> wrote on 03/10/2003 03:51:20 PM:

> 
> 
> 
> 
> Coming from an Ant background, I've got a tendency to use java package
> naming conventions for my variables/properties.
> Example: widget.color.hue
> 
> Now, I've been using Maven alot and so far it has worked pretty well.
> However, there seems to be a particular case where expression evaluation 
is
> not as expected:
> 
>   <goal name="jelly-error">
> 
>     <!-- if expression with a non-dotted variable: abc -->
>     <j:set var="abc" value="123"/>
>     <echo>abc=${abc}</echo>
>     <j:if test="${abc != null}">
>       <echo>Recognized abc is not null</echo>
>     </j:if>
> 
>     <!-- if expression with a dotted varible: a.b.c -->
>     <j:set var="a.b.c" value="456"/>
>     <echo>a.b.c=${a.b.c}</echo>
>     <j:if test="${a.b.c != null}">
>       <!-- expression evaluates to false and never gets here -->
>       <echo>Recognized a.b.c is not null"</echo>
>     </j:if>
>   </goal>
> 
> 
> Output:
> 
>     [echo] abc=123
>     [echo] Recognized abc is not null
>     [echo] a.b.c=456
> 
> As you can see, a.b.c != null did not evaluate to true.
> 
> Bug or feature?
> 
> BTW, I'm using jelly/jext shipped with Maven Beta 10.
> 
> Thanks,
> 
> Semir
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


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


Mime
View raw message