[ 
https://issues.apache.org/jira/browse/VELOCITY-675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jarkko Viinamäki updated VELOCITY-675:
--------------------------------------

    Attachment: velocity-675.patch

This should fix it. ASTDirective now checks if the node has a body. If it 
doesn't, it does not create a BlockMacro instance and renders as literal 
instead.

> #...@foo causes an NPE
> -------------------
>
>                 Key: VELOCITY-675
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-675
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>         Attachments: velocity-675.patch
>
>
> The following syntax (without #end) causes an NPE:  "#...@foo"
> class java.lang.NullPointerException
> apache.velocity.runtime.parser.node.SimpleNode.jjtGetChild(SimpleNode.java:183)
>  
> org.apache.velocity.runtime.directive.BlockMacro.init(BlockMacro.java:107) 
> org.apache.velocity.runtime.parser.node.ASTDirective.init(ASTDirective.java:138)
>  
> org.apache.velocity.runtime.parser.node.SimpleNode.init(SimpleNode.java:309) 
> org.apache.velocity.Template.initDocument(Template.java:218) 
> org.apache.velocity.Template.process(Template.java:126) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to