You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Pranay Pandey <pr...@hotwaxmedia.com> on 2009/06/08 15:20:49 UTC

Improvements in UPS services

Hello All,

While going through the code in UpsServices.java I have observed that  
there is a need of improvement in the code written there.
Specially it needs to be improved for 2 things:

1. I18n for error and success messages.
2. Putting values in elements which are required for XML must be  
checked for null values and other wise "" should be sent in the  
request. Because there may be few fields which are not there in db for  
a specific record.

For #2 there are already checks on few like address2 field form  
PostalAddress which can be null at any moment. IMO this should also be  
done for the fields like attnName which can be sometimes null.
I want to do those changes to avoid null pointer exceptions which  
usually comes because of the lack of the information but can be  
processed with "" without any harm.

I also may be wrong here so please correct me if this is the case.

There can be few more things. If some of you want to point.

Thoughts?

Thanks & Regards
--
Pranay Pandey
HotWax Media | http://www.hotwaxmedia.com


Re: Improvements in UPS services

Posted by Ashish Vijaywargiya <as...@hotwaxmedia.com>.
I agree on both the points, Pranay.
+1 from my side for this improvement.

--
Ashish

Pranay Pandey wrote:
> Hello All,
>
> While going through the code in UpsServices.java I have observed that 
> there is a need of improvement in the code written there.
> Specially it needs to be improved for 2 things:
>
> 1. I18n for error and success messages.
> 2. Putting values in elements which are required for XML must be 
> checked for null values and other wise "" should be sent in the 
> request. Because there may be few fields which are not there in db for 
> a specific record.
>
> For #2 there are already checks on few like address2 field form 
> PostalAddress which can be null at any moment. IMO this should also be 
> done for the fields like attnName which can be sometimes null.
> I want to do those changes to avoid null pointer exceptions which 
> usually comes because of the lack of the information but can be 
> processed with "" without any harm.
>
> I also may be wrong here so please correct me if this is the case.
>
> There can be few more things. If some of you want to point.
>
> Thoughts?
>
> Thanks & Regards
> -- 
> Pranay Pandey
> HotWax Media | http://www.hotwaxmedia.com
>
>