Hi Velocity Users and devs,
My excuses when you get this email twice. I think it concerns both groups
after reading this page:
http://wiki.apache.org/velocity/GettingYourPatchCommitted
When I was playing with the Velocity Template Engine I got a
NullPointerException. Maybe it is because of my unusual configuration that
this exception didn't occured before to others. But in my opinion this kind
of Exceptions may never occur.
To be specific. I have Velocity version 1.7. The Exception is thrown on line
225 in Foreach.java
if (!hasNextName.equals("velocityHasNext"))
When the variable hasNextName equals null
hasNextName is a deprecated config setting. It is assigned on line 210:
hasNextName = rsvc.getString(RuntimeConstants.HAS_NEXT_NAME);
A possible fix is to change the evaluation to
if (!"velocityHasNext".equals(hasNextName))
Since this kind of evaluation is done on more places (also on line 217) I'm
willing to create a patch.
I could not find a JIRA ticket concerning this issue. So can I just create a
patch and commit this?
Cheers,
Rachid.