You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2015/09/24 22:33:35 UTC

Re: svn commit: r1705136 - /ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml

Actually, the <set> element is unnecessary. Mini-language will create a 
new Map automatically.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 9/24/2015 1:28 PM, jleroux@apache.org wrote:
> Author: jleroux
> Date: Thu Sep 24 20:28:21 2015
> New Revision: 1705136
>
> URL: http://svn.apache.org/viewvc?rev=1705136&view=rev
> Log:
> No functional change, while reviewing new OFBIZ-293 proposition I stumbled upon this. The value="null" is here unnecessary and confusing
>
> Modified:
>      ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml
>
> Modified: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml?rev=1705136&r1=1705135&r2=1705136&view=diff
> ==============================================================================
> --- ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml (original)
> +++ ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml Thu Sep 24 20:28:21 2015
> @@ -655,7 +655,7 @@
>                   <set field="custRequestIndexList" type="List"/>
>                   <set field="custRequestList" type="List"/>
>                   <loop count="${rowCount}" field="j">
> -                    <set field="custRequestMap" value="null" type="NewMap"/>
> +                    <set field="custRequestMap" type="NewMap"/>
>                       <set field="custRequestMap.custRequestId" from-field="paramMap[&quot;custRequestId_o_${j}&quot;]"/>
>                       <set field="custRequestMap.custSequenceNum" from-field="paramMap[&quot;realSequenceNum_o_${j}&quot;]"/>
>                       <field-to-list list="custRequestList" field="custRequestMap"/>
> @@ -664,7 +664,7 @@
>                   <set field="newCustRequestList" type="List"/>
>                   <set field="custRequestListWithNewSeq" type="List"/>
>                   <loop count="${rowCount}" field="k">
> -                    <set field="custRequestMap" value="null" type="NewMap"/>
> +                    <set field="custRequestMap" type="NewMap"/>
>                       <set field="custRequestMap.custRequestId" from-field="paramMap[&quot;custRequestId_o_${k}&quot;]"/>
>                       <set field="oldSequenceNum" from-field="paramMap[&quot;realSequenceNum_o_${k}&quot;]"/>
>                       <set field="newSequenceNum" from-field="paramMap[&quot;newSequenceNum_o_${k}&quot;]"/>
>
>

Re: svn commit: r1705136 - /ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml

Posted by Jacques Le Roux <ja...@les7arts.com>.
Right, that's what I do. I'm a lazy guy :)
I create a NewMap/List when I need to put things in with "${groovy: ..." Because you then need to name things.

Ha, just found this http://ofbiz.135035.n4.nabble.com/NewList-and-NewMap-keep-giving-warning-for-invalid-type-in-simple-method-td4636243.html#a4636247

Jacques

Le 24/09/2015 22:33, Adrian Crum a écrit :
> Actually, the <set> element is unnecessary. Mini-language will create a new Map automatically.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 9/24/2015 1:28 PM, jleroux@apache.org wrote:
>> Author: jleroux
>> Date: Thu Sep 24 20:28:21 2015
>> New Revision: 1705136
>>
>> URL: http://svn.apache.org/viewvc?rev=1705136&view=rev
>> Log:
>> No functional change, while reviewing new OFBIZ-293 proposition I stumbled upon this. The value="null" is here unnecessary and confusing
>>
>> Modified:
>> ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml
>>
>> Modified: ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml?rev=1705136&r1=1705135&r2=1705136&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml (original)
>> +++ ofbiz/trunk/specialpurpose/scrum/script/org/ofbiz/scrum/ScrumEvents.xml Thu Sep 24 20:28:21 2015
>> @@ -655,7 +655,7 @@
>>                   <set field="custRequestIndexList" type="List"/>
>>                   <set field="custRequestList" type="List"/>
>>                   <loop count="${rowCount}" field="j">
>> -                    <set field="custRequestMap" value="null" type="NewMap"/>
>> +                    <set field="custRequestMap" type="NewMap"/>
>>                       <set field="custRequestMap.custRequestId" from-field="paramMap[&quot;custRequestId_o_${j}&quot;]"/>
>>                       <set field="custRequestMap.custSequenceNum" from-field="paramMap[&quot;realSequenceNum_o_${j}&quot;]"/>
>>                       <field-to-list list="custRequestList" field="custRequestMap"/>
>> @@ -664,7 +664,7 @@
>>                   <set field="newCustRequestList" type="List"/>
>>                   <set field="custRequestListWithNewSeq" type="List"/>
>>                   <loop count="${rowCount}" field="k">
>> -                    <set field="custRequestMap" value="null" type="NewMap"/>
>> +                    <set field="custRequestMap" type="NewMap"/>
>>                       <set field="custRequestMap.custRequestId" from-field="paramMap[&quot;custRequestId_o_${k}&quot;]"/>
>>                       <set field="oldSequenceNum" from-field="paramMap[&quot;realSequenceNum_o_${k}&quot;]"/>
>>                       <set field="newSequenceNum" from-field="paramMap[&quot;newSequenceNum_o_${k}&quot;]"/>
>>
>>
>