Hi Geir,
I would like to test the new VM code. But I need a version with the
fixed Map.put and the #set bang features (the current CVS version
leaves a variable as is when it encoutners a NULL, then the
application cannot check and uses wrong data; also I would like
to avoid the logs when I know I'm using it in a possibly null
returing manner).
I encountered strange behaviour (bugs) using interpolation and VM.
* #set($foo = "$")##any string ending in a $ or # emits parser errors
Workaround use the '$' form (which is not allways possible...).
* A #if($foo)#end also emits parser errors.
* I would like to use the #macro feature as follows:
#macro( call $foo )#if($foo)#**##end#end
#macro( log $message )#call( $log.add($message) )#end
and then
#log("$date <Error> Some more text")
which emits an Exception:
Thu Jan 18 16:53:38 CET 2001 [error] Parser Exception: VM:log :
org.apache.velocity.runtime.parser.ParseException: Encountered
"<" at line 1, column 23.
Was expecting one of:
"," ...
")" ...
> As promised, but late, there is a new vel.jar and other stuff in
> whiteboard/geir. What I am looking for is a few people to give it a
> shakedown to see how it works. I will warn you now it is slower, but it
> works correctly. The current implementation in CVS is faster, but
> buggy. So anyone that tortures the VM system (like Jose :), it would be
> appreciated if you could take a shot with this jar to make sure it's ok.
>
> If you find a problem, doublecheck to make sure the output with the
> current CVS is actually right... either way, say something : I am
> interested in the problems with the current impl as well to make test
> bed cases.
and
> I put another velocity-0.8.jar in whiteboard/geir.
> If nothing ugly comes up, I will check in the code tomorrow or this
> weekend.
I hope your new VM implementation fixes the latter one. The other two
can be avoided with workarounds. I saw you took the vel.jar from the
whiteboard.
:) Christoph