On Wed, 08 Dec 2004 15:21:34 -0500, Mike Kienenberger <[EMAIL PROTECTED]> wrote: ... > In general, should Velocity tools that operate on a String operate on an > Object instead and perform a object.toString() conversion first? Or at > least provide Object argument wrapper methods to call the String argument > methods? ...
in general, yes. the type of VTL references is a) not obvious, b) mutable, and c) not as important as its string representation (since we're working with the ''V" in MVC here). as such, it's usually a good idea to accept Objects and then attempt conversion to the needed type. if the param is null or the conversion can't be made, then it is usually considered best to return null rather than throw exceptions. these aren't hard and fast rules, but they've worked very well for me. and they are what i prefer when it comes to contributions/patches. ;-) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]