You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adam Heath <do...@brainfood.com> on 2010/01/14 18:22:51 UTC

Re: svn commit: r899116 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java

jacopoc@apache.org wrote:
> Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java?rev=899116&r1=899115&r2=899116&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java (original)
> +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java Thu Jan 14 08:46:04 2010
> @@ -73,8 +73,8 @@
>          }
>  
>          if (count < 1) {
> -            Debug.logWarning("Count is less than one, not doing nothing: " + rawString(), module);
> -            return false;
> +            Debug.logWarning("Count is less than one, not doing anything: " + rawString(), module);
> +            return true;

Do we *really* need to have this warning here?  How often will the
loop count be zero?

I could see having a warning or error if it is negative.

Re: svn commit: r899116 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java

Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
On Jan 14, 2010, at 6:22 PM, Adam Heath wrote:

> jacopoc@apache.org wrote:
>> Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java?rev=899116&r1=899115&r2=899116&view=diff
>> ==============================================================================
>> --- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java (original)
>> +++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/envops/Loop.java Thu Jan 14 08:46:04 2010
>> @@ -73,8 +73,8 @@
>>         }
>> 
>>         if (count < 1) {
>> -            Debug.logWarning("Count is less than one, not doing nothing: " + rawString(), module);
>> -            return false;
>> +            Debug.logWarning("Count is less than one, not doing anything: " + rawString(), module);
>> +            return true;
> 
> Do we *really* need to have this warning here?  How often will the
> loop count be zero?
> 
> I could see having a warning or error if it is negative.

You are right Adam, I have now modified the if condition from count<1 to count<0: in this way the warning message will be logged only if count is negative.

Jacopo