You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2004/09/21 12:23:58 UTC

DO NOT REPLY [Bug 31333] New: - Velocity doesn't do arithmetics with java.lang.Long

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31333>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31333

Velocity doesn't do arithmetics with java.lang.Long

           Summary: Velocity doesn't do arithmetics with java.lang.Long
           Product: Velocity
           Version: 1.4
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Source
        AssignedTo: velocity-dev@jakarta.apache.org
        ReportedBy: teo@mediaworks.lt


If I put a java.lang.Long value into velocity context and try to do
arithmetics ('#set ($result = $long_value + 1)') with it, I get an 
undefined value. If I convert that value into java.lang.Integer and 
put Integer into context, simple arithmetic operations work well.

Is this a bug, or is this intended operation? I really need operations
on Long values in velocity templates. I could write support for this
myself, but I want feedback before doing it.

P.S. I also checked other classes, like java.lang.Double, java.lang.Float- they
don't work either.

P.P.S. I also checked this on Velocity v1.3, same results.

Teofilis Martisius

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