You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by bu...@apache.org on 2002/07/26 18:35:09 UTC
DO NOT REPLY [Bug 11211] New: -
NullPointerException thrown when using == instead of = in #set directive
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11211>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11211
NullPointerException thrown when using == instead of = in #set directive
Summary: NullPointerException thrown when using == instead of =
in #set directive
Product: Velocity
Version: 1.3-rc1
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Source
AssignedTo: velocity-dev@jakarta.apache.org
ReportedBy: peixotto@geofolio.com
When using == instead of = inside a #set directive a NullPointerException is
thrown. For example,
#set($dave == "aCoolGuy")
will cause an NPE to be thrown. The syntax is obviously wrong, but Velocity
should give a helpful error message, or at least some kind of error message
rather than throwing an NPE.
The relevant portion of the stack trace has been included below:
java.lang.NullPointerException
at
org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:135)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:271)
at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:358)
at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:252)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>