On Jan 14, 2010, at 6:22 PM, Adam Heath wrote:
>
[hidden email] 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