Michael Salmon wrote:
>
> hi folks,
> I added extra methods to VMContext to automatically convert native types
> being put into a context to their Object. This saves casting on the
> developer and is something I think is reasonable to add.
> diff attached.
>
I dunno ... I run across this a lot, and quite frankly it doesn't
bother me to just do a new <FOO>.
The problem that I see is that this makes the API for VelocityContext
different than that of Context - so if you get into the [bad] habit of
using the helper methods instead of just using something like
context.put( "foo", new Integer(2));
then when you move that code into a more generic situation where you are
passed a Context rather than a VelocityContext, all will break. (Don't
even suggest this for the Context interface...:)
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!