svn commit: r884003 - /ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java

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

svn commit: r884003 - /ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java

ashish-18
Author: ashish
Date: Wed Nov 25 08:02:23 2009
New Revision: 884003

URL: http://svn.apache.org/viewvc?rev=884003&view=rev
Log:
Improved code to avoid NPE.

Modified:
    ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java

Modified: ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java?rev=884003&r1=884002&r2=884003&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java (original)
+++ ofbiz/trunk/specialpurpose/ebay/src/org/ofbiz/ebay/EbayOrderServices.java Wed Nov 25 08:02:23 2009
@@ -1151,7 +1151,10 @@
                 // create new party's contact information
                 if (UtilValidate.isEmpty(contactMechId)) {
                     Map buyerCtx = (Map) context.get("buyerCtx");
-                    String eiasTokenBuyer = (String) buyerCtx.get("eiasTokenBuyer");
+                    String eiasTokenBuyer = null;
+                    if (UtilValidate.isNotEmpty(buyerCtx)) {
+                        eiasTokenBuyer = (String) buyerCtx.get("eiasTokenBuyer");
+                    }    
                     Debug.logInfo("Creating new postal address for party: " + partyId, module);
                     contactMechId = EbayHelper.createAddress(dispatcher, partyId, userLogin, "SHIPPING_LOCATION", shippingAddressCtx);
                     if (UtilValidate.isEmpty(contactMechId)) {