CheckoutEvents#cartNotEmpty implementation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CheckoutEvents#cartNotEmpty implementation

rajsaini
org.ofbiz.order.shoppingcart.CheckOutEvents#cartNotEmpty method calls
UtilValidate#isNotEmpty(ShoppingCart)) and it in turn calls
ObjectType#isEmpty(Object) method to check if the passed object is
empty. Implementation of ObjectType#isEmpty(Object) checks for String,
Map and Collection types. How does the emptiness of cart is checked
here? Am I missing something?

Thanks,

Raj

Reply | Threaded
Open this post in threaded view
|

Re: CheckoutEvents#cartNotEmpty implementation

Bilgin Ibryam
You are right Raj. This event will return true for every (not null)  
cart.
It is fixed in 735886. Thanks for reporting.

Bilgin

On Jan 19, 2009, at 11:30 AM, Raj Saini wrote:

> org.ofbiz.order.shoppingcart.CheckOutEvents#cartNotEmpty method  
> calls UtilValidate#isNotEmpty(ShoppingCart)) and it in turn calls  
> ObjectType#isEmpty(Object) method to check if the passed object is  
> empty. Implementation of ObjectType#isEmpty(Object) checks for  
> String, Map and Collection types. How does the emptiness of cart is  
> checked here? Am I missing something?
>
> Thanks,
>
> Raj
>

Reply | Threaded
Open this post in threaded view
|

Re: CheckoutEvents#cartNotEmpty implementation

rajsaini
Thanks Bilgin.

Raj

Bilgin Ibryam wrote:

> You are right Raj. This event will return true for every (not null) cart.
> It is fixed in 735886. Thanks for reporting.
>
> Bilgin
>
> On Jan 19, 2009, at 11:30 AM, Raj Saini wrote:
>
>> org.ofbiz.order.shoppingcart.CheckOutEvents#cartNotEmpty method calls
>> UtilValidate#isNotEmpty(ShoppingCart)) and it in turn calls
>> ObjectType#isEmpty(Object) method to check if the passed object is
>> empty. Implementation of ObjectType#isEmpty(Object) checks for
>> String, Map and Collection types. How does the emptiness of cart is
>> checked here? Am I missing something?
>>
>> Thanks,
>>
>> Raj
>>
>
>