#if( $foo.class.name == "java.lang.Integer" ) or just don't give your macro to an untrusted user. or if you can at least trust the user to pass a number, then $foo.intValue() is all you need.
On Fri, Jun 26, 2009 at 10:52 AM, ChadDavis<chadmichaelda...@gmail.com> wrote: > I have a macro that takes an integer parameter. AFAIK, there's no > support for typing in the Velocity language. How can I verify that > the parameter is an integer value before doing my velocity macro > logic? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org > For additional commands, e-mail: user-h...@velocity.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org