You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Alexey Panchenko <al...@olmisoft.com> on 2005/10/24 11:04:11 UTC
Re: svn commit: r291204 - in /jakarta/velocity/core/trunk: src/java/org/apache/velocity/runtime/parser/node/ src/test/org/apache/velocity/test/ src/test/org/apache/velocity/test/provider/ test/templates/ test/templates/compare/
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:alex+news@olmisoft.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: Re[2]: svn commit: r291204 - in /jakarta/velocity/core/trunk: src/java/org/apache/velocity/runtime/parser/node/ src/test/org/apache/velocity/test/ src/test/org/apache/velocity/test/provider/ test/templates/ test/templates/compare/
Posted by Will Glass-Husain <wg...@forio.com>.
Ok, fixed this.
Thanks for catching it!
As a suggestion - file a JIRA report next time and the issue can be tracked.
Best, WILL
----- Original Message -----
From: "Will Glass-Husain" <wg...@forio.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>; "Alexey
Panchenko" <al...@olmisoft.com>
Sent: Wednesday, November 16, 2005 9:23 PM
Subject: Re: Re[2]: svn commit: r291204 - in /jakarta/velocity/core/trunk:
src/java/org/apache/velocity/runtime/parser/node/
src/test/org/apache/velocity/test/
src/test/org/apache/velocity/test/provider/ test/templates/
test/templates/compare/
> umm, not yet. I'll do that.
>
> WILL
>
> ----- Original Message -----
> From: "Alexey Panchenko" <al...@olmisoft.com>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Wednesday, November 16, 2005 8:55 PM
> Subject: Re[2]: svn commit: r291204 - in /jakarta/velocity/core/trunk:
> src/java/org/apache/velocity/runtime/parser/node/
> src/test/org/apache/velocity/test/
> src/test/org/apache/velocity/test/provider/ test/templates/
> test/templates/compare/
>
>
>> Hello, Will !
>>
>>> Let me look into this.
>>
>> Have you had a chance to take a look at this ?
>>
>> What do you think about applying this patch:
>>
>> Index: src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
>> ===================================================================
>> --- src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
>> (revision 345188)
>> +++ src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
>> (working copy)
>> @@ -172,6 +172,9 @@
>> for (int i = 0; i < numChildren; i++)
>> {
>> result = getChild(i).execute(result,context);
>> + if (result == null) {
>> + break;
>> + }
>> }
>>
>> return result;
>>
>>
>>> Thanks,
>>
>>> WILL
>>
>>> ----- Original Message -----
>>> From: "Alexey Panchenko" <al...@olmisoft.com>
>>> To: "Velocity Developers List" <ve...@jakarta.apache.org>
>>> Sent: Monday, October 24, 2005 2:04 AM
>>> Subject: Re: svn commit: r291204 - in /jakarta/velocity/core/trunk:
>>> src/java/org/apache/velocity/runtime/parser/node/
>>> src/test/org/apache/velocity/test/
>>> src/test/org/apache/velocity/test/provider/ test/templates/
>>> test/templates/compare/
>>
>>
>>>> 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:alex+news@olmisoft.com
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>>>
>>
>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
>>
>>
>>
>> --
>> Best regards,
>> Alexey mailto:alex+news@olmisoft.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: Re[2]: svn commit: r291204 - in /jakarta/velocity/core/trunk: src/java/org/apache/velocity/runtime/parser/node/ src/test/org/apache/velocity/test/ src/test/org/apache/velocity/test/provider/ test/templates/ test/templates/compare/
Posted by Will Glass-Husain <wg...@forio.com>.
umm, not yet. I'll do that.
WILL
----- Original Message -----
From: "Alexey Panchenko" <al...@olmisoft.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Wednesday, November 16, 2005 8:55 PM
Subject: Re[2]: svn commit: r291204 - in /jakarta/velocity/core/trunk:
src/java/org/apache/velocity/runtime/parser/node/
src/test/org/apache/velocity/test/
src/test/org/apache/velocity/test/provider/ test/templates/
test/templates/compare/
> Hello, Will !
>
>> Let me look into this.
>
> Have you had a chance to take a look at this ?
>
> What do you think about applying this patch:
>
> Index: src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
> ===================================================================
> --- src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
> (revision 345188)
> +++ src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
> (working copy)
> @@ -172,6 +172,9 @@
> for (int i = 0; i < numChildren; i++)
> {
> result = getChild(i).execute(result,context);
> + if (result == null) {
> + break;
> + }
> }
>
> return result;
>
>
>> Thanks,
>
>> WILL
>
>> ----- Original Message -----
>> From: "Alexey Panchenko" <al...@olmisoft.com>
>> To: "Velocity Developers List" <ve...@jakarta.apache.org>
>> Sent: Monday, October 24, 2005 2:04 AM
>> Subject: Re: svn commit: r291204 - in /jakarta/velocity/core/trunk:
>> src/java/org/apache/velocity/runtime/parser/node/
>> src/test/org/apache/velocity/test/
>> src/test/org/apache/velocity/test/provider/ test/templates/
>> test/templates/compare/
>
>
>>> 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:alex+news@olmisoft.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>>
>
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
>
>
> --
> Best regards,
> Alexey mailto:alex+news@olmisoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re[2]: svn commit: r291204 - in /jakarta/velocity/core/trunk: src/java/org/apache/velocity/runtime/parser/node/ src/test/org/apache/velocity/test/ src/test/org/apache/velocity/test/provider/ test/templates/ test/templates/compare/
Posted by Alexey Panchenko <al...@olmisoft.com>.
Hello, Will !
> Let me look into this.
Have you had a chance to take a look at this ?
What do you think about applying this patch:
Index: src/java/org/apache/velocity/runtime/parser/node/ASTReference.java
===================================================================
--- src/java/org/apache/velocity/runtime/parser/node/ASTReference.java (revision 345188)
+++ src/java/org/apache/velocity/runtime/parser/node/ASTReference.java (working copy)
@@ -172,6 +172,9 @@
for (int i = 0; i < numChildren; i++)
{
result = getChild(i).execute(result,context);
+ if (result == null) {
+ break;
+ }
}
return result;
> Thanks,
> WILL
> ----- Original Message -----
> From: "Alexey Panchenko" <al...@olmisoft.com>
> To: "Velocity Developers List" <ve...@jakarta.apache.org>
> Sent: Monday, October 24, 2005 2:04 AM
> Subject: Re: svn commit: r291204 - in /jakarta/velocity/core/trunk:
> src/java/org/apache/velocity/runtime/parser/node/
> src/test/org/apache/velocity/test/
> src/test/org/apache/velocity/test/provider/ test/templates/
> test/templates/compare/
>> 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:alex+news@olmisoft.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
--
Best regards,
Alexey mailto:alex+news@olmisoft.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
Re: svn commit: r291204 - in /jakarta/velocity/core/trunk: src/java/org/apache/velocity/runtime/parser/node/ src/test/org/apache/velocity/test/ src/test/org/apache/velocity/test/provider/ test/templates/ test/templates/compare/
Posted by Will Glass-Husain <wg...@forio.com>.
Let me look into this.
Thanks,
WILL
----- Original Message -----
From: "Alexey Panchenko" <al...@olmisoft.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Monday, October 24, 2005 2:04 AM
Subject: Re: svn commit: r291204 - in /jakarta/velocity/core/trunk:
src/java/org/apache/velocity/runtime/parser/node/
src/test/org/apache/velocity/test/
src/test/org/apache/velocity/test/provider/ test/templates/
test/templates/compare/
> 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:alex+news@olmisoft.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org