ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques Le Roux <jacques.le.r...@les7arts.com>
Subject Re: svn commit: r1789711 - /ofbiz/ofbiz-framework/trunk/applications/content/groovyScripts/content/Get ContentLookupList.groovy
Date Fri, 31 Mar 2017 20:10:39 GMT
BTW I forgot to thank you for your review. I think you mixed the new snippet with the one above
from where I C/P.

Jacques


Le 31/03/2017 à 21:16, Jacques Le Roux a écrit :
> Le 31/03/2017 à 19:16, Taher Alkhateeb a écrit :
>> I'm not sure why you're using a fixed name instead of the field name
>> fetching mechanism, especially that this is a loop.
> VIEW_SIZE is a well known name for OFBiz developers and Michael is right we don't need
to show a such error in UI. I see no loop :-o
>> Also, I'm not sure the entire try / catch block is necessary.
> Integer.valueOf throws a |NumberFormatException which we can't ignore. I don't think
re-throwing the exception would be a good idea |
>> What test made you believe you need to hard code the field in here?
> You mean the VIEW_SIZE name :-o ?
>
> Jacques
>>
>> On Fri, Mar 31, 2017 at 8:00 PM, <jleroux@apache.org> wrote:
>>
>>> Author: jleroux
>>> Date: Fri Mar 31 17:00:58 2017
>>> New Revision: 1789711
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1789711&view=rev
>>> Log:
>>> No functional change, fixes a C/P with wrong value name in errMsgList
>>>
>>> Modified:
>>>      ofbiz/ofbiz-framework/trunk/applications/content/
>>> groovyScripts/content/GetContentLookupList.groovy
>>>
>>> Modified: ofbiz/ofbiz-framework/trunk/applications/content/
>>> groovyScripts/content/GetContentLookupList.groovy
>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/
>>> applications/content/groovyScripts/content/GetContentLookupList.groovy?
>>> rev=1789711&r1=1789710&r2=1789711&view=diff
>>> ============================================================
>>> ==================
>>> --- ofbiz/ofbiz-framework/trunk/applications/content/
>>> groovyScripts/content/GetContentLookupList.groovy (original)
>>> +++ ofbiz/ofbiz-framework/trunk/applications/content/
>>> groovyScripts/content/GetContentLookupList.groovy Fri Mar 31 17:00:58 2017
>>> @@ -70,7 +70,7 @@ try {
>>>       viewSize = Integer.valueOf((String)parameters.get("VIEW_SIZE")).
>>> intValue()
>>>   } catch (NumberFormatException nfe) {
>>>       Debug.logError(nfe, "Caught an exception : " + nfe.toString(),
>>> "GetContentLookupList.groovy")
>>> -    errMsgList.add("Entered value is non-numeric for numeric field: " +
>>> field.getName())
>>> +    errMsgList.add("Entered value is non-numeric for numeric field:
>>> VIEW_SIZE"))
>>>   }
>>>
>>>   context.viewSize = viewSize
>>>
>>>
>>>
>
>


Mime
View raw message