velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Polet <>
Subject Handling of primitive type arrays
Date Wed, 18 Apr 2012 17:51:32 GMT
Hi list,

I was wondering how arrays of primitives are handled in Velocity. I feel 
that they are converted to List<> and then we cannot invoke methods with 
them as parameters.

Let's take an example:

#set($array = [$ref.getLong(), $ref.getLong(), $ref.getLong()] # where 
$ref.getLong() returns a long (primitive type)
#ref.invokeSomeMethod($array) # where the signature is actually public 
void invokeSomeMethod(long[] values)

How can I get this to work?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message