velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aéris <aeris.imir...@gmail.com>
Subject NPE on a custom Velocity Tool
Date Sun, 24 Apr 2011 19:16:53 GMT
Hi,

I experiment some trouble with a custom tool for Velocity
My code is here: http://pastebin.com/WUNzWpB5

But when I try to evaluate this template:
	${format.resources(resources)}
I get a NPE: http://pastebin.com/2qa7NnuZ

If I run into debug, seems my « resources » parameter on Formatter class is 
null, but presents on Velocity context.

If try to evaluate this template:
	${resources}
the output is correct and equals to « toString » on my resource, showing 
Velocity context seems good…

What I do wrong with my custom tools and how to fix this NPE?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message