You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by ch...@finaris.de on 2012/09/19 13:31:42 UTC
Wrong evaluation results with velocity 1.6.2
Hi,
The evaluation of the following Velocity Template produces an invalid
output:
#set($v = "a")
$v.charAt(0)a.xxx
I would expect aa.xxx as evaluation result, but velocity returns only aa -
the dot and the xxx suffix are cut off.
If a whitespace is inserted before a.xxx, then the suffix is not cut off.
But that solution is not possible for me.
Is this a known bug? Is there a fix or work-around for this?
Kind regards
Christoff Schmitz
=======================================================
Disclaimer
The information contained in this e - mail and any attachments
( together the "message") is intended for the addressee only and may
contain confidential and/or privileged information. If you have received
the message by mistake please delete it and notify the sender and do
not copy or distribute it or disclose its contents to anyone.
FINARIS Financial Software Partner GmbH
Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
Registered at Frankfurt/Main, HRB 52873
Managing Directors:
Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl. Inf. Werner Märkl
=======================================================
Re: Wrong evaluation results with velocity 1.6.2
Posted by Erik Hatcher <er...@gmail.com>.
${v.charAt(0)}a.xx should do the trick. When in doubt, surround with curly brackets :)
Erik
On Sep 19, 2012, at 07:31 , christoff.schmitz@finaris.de wrote:
> Hi,
>
> The evaluation of the following Velocity Template produces an invalid
> output:
>
> #set($v = "a")
> $v.charAt(0)a.xxx
>
> I would expect aa.xxx as evaluation result, but velocity returns only aa -
> the dot and the xxx suffix are cut off.
> If a whitespace is inserted before a.xxx, then the suffix is not cut off.
> But that solution is not possible for me.
>
> Is this a known bug? Is there a fix or work-around for this?
>
> Kind regards
>
> Christoff Schmitz
>
> =======================================================
> Disclaimer
> The information contained in this e - mail and any attachments
> ( together the "message") is intended for the addressee only and may
> contain confidential and/or privileged information. If you have received
> the message by mistake please delete it and notify the sender and do
> not copy or distribute it or disclose its contents to anyone.
>
> FINARIS Financial Software Partner GmbH
> Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
> Registered at Frankfurt/Main, HRB 52873
>
> Managing Directors:
> Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl. Inf. Werner Märkl
> =======================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org