Hello !

What are the reasons for the change below ?

Example template code:

=================================
#set($x = {}) ## create empty map
$x.get('aaa').ccc
=================================

With new code I got in the log:

ERROR ASTIdentifier.execute() : identifier = ccc (with NullPointerException)
WARN ReferenceException ....

The previous behavior was only:

WARN ReferenceException ....

Can somebody fix this ?

> Author: wglass
> Date: Fri Sep 23 14:27:22 2005
> New Revision: 291204

> URL: http://svn.apache.org/viewcvs?rev=291204&view=rev
> Log:
> silent reference now works when toString of the context returns
> null. (was throwing an exception. Thanks to Llwellyn Falco and Dan
> Powell for the patch!


> Modified: 
> jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
> URL: 
> http://svn.apache.org/viewcvs/jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTReference.java?rev=291204&r1=291203&r2=291204&view=diff
> ==============================================================================
> --- 
> jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
>  (original)
> +++ 
> jakarta/velocity/core/trunk/src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
>  Fri Sep 23 14:27:22 2005
> @@ -171,11 +171,6 @@
>              for (int i = 0; i < numChildren; i++)
>              {
>                  result = jjtGetChild(i).execute(result,context);
> -
> -                if (result == null)
> -                {
> -                    return null;
> -                }
>              }
 
>              return result;

-- 
Best regards,
 Alexey                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to