You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:10:43 UTC

[jira] Closed: (VELOCITY-335) Error passing double into method

     [ https://issues.apache.org/jira/browse/VELOCITY-335?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henning Schmiedehausen closed VELOCITY-335.
-------------------------------------------


> Error passing double into method
> --------------------------------
>
>                 Key: VELOCITY-335
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-335
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.4
>         Environment: Operating System: Mac OS X 10.3
> Platform: Macintosh
>            Reporter: Doug Kirk
>         Assigned To: Velocity-Dev List
>
> A reference that passes a double value into a Java method errors.
> The VTL source for this is:
> ----------------------
> #set ($x = 0.19)
> $auditCalculator.weightedScores($audit, 1, $x)
> Now, the #set is line 24 (for stack trace that follows). This is a testing case, as the 0.19 value was coded 
> directly in the method call as a constant. $auditCalculator is a custom-written tool object with a 
> method signature:
>     public double weightedScores(Audit audit, int section, double weight)
> Relevant stack trace:
> ------------------
> Caused by: org.apache.velocity.exception.ParseErrorException: Lexical error: 
> org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 24, column 14.  Encountered: 
> "1" (49), after : "."
> 	at org.apache.velocity.Template.process(Template.java:141)
> 	at 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:
> 423)
> 	at 
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:
> 341)
> 	at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
> 	at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:303)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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