Well, I don't know how to explain you, it seems evident to me...
In the first case you check if "productStore" is null or not. In the
second case, you don't check.
So, what is the correct behaviour ? Should an order be linked to a
productStore or not ?
If yes, why the first test ?
If no, there is missing a test in the second case.

>From my point of view I would say no because an order with products of
type "service" don't need productStore.

To Scott : you should consider there are different kind of
contributors on open source projects, I'm the kind of contributor who
send emails when I find something I think is a bug, I'm still not in
the category of "patch providers" ! :-)

Cimballi


On Fri, May 29, 2009 at 7:16 PM, Scott Gray <[email protected]> wrote:
> Hi Cimballi
>
> Inconsistencies aren't necessarily bugs, but you are most welcome to create
> a patch and jira issue for the corrections you think should be made.
>
> Thanks
> Scott
>
> On 30/05/2009, at 10:39 AM, Cimballi wrote:
>
>> Hi,
>>
>> There are several inconsistancies in the file
>>
>> "applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy".
>>
>> I didn't note all of them, but here is an example :
>>
>> Line 260, productStore can be null :
>>   productStore = orderHeader.getRelatedOne("ProductStore");
>>   if (productStore) {
>>       facility = productStore.getRelatedOne("Facility");
>>
>> Line 380, here productStore cannot be null :
>>   productStoreId =
>> orderHeader.getRelatedOne("ProductStore").productStoreId;
>>
>> Cimballi
>
>

Reply via email to