Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-3926

NPE in EbayOrderServices.createShoppingCart

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • Trunk
    • ebay
    • None

    Description

      Due to missing property "stateProvinceGeoId" in shippingAddressCtx the following call raises an NPE (EbayOrderServices.createShoppingCart, line 1118ff):

      List<GenericValue> shipInfo = PartyWorker.findMatchingPersonPostalAddresses(delegator, shippingAddressCtx.get("shippingAddressStreet1").toString(),
      (UtilValidate.isEmpty(shippingAddressCtx.get("shippingAddressStreet2")) ? null : shippingAddressCtx.get("shippingAddressStreet2").toString()), shippingAddressCtx.get("city").toString(),
      shippingAddressCtx.get("stateProvinceGeoId").toString(), shippingAddressCtx.get("shippingAddressPostalCode").toString(), null, shippingAddressCtx.get("countryGeoId").toString(), firstName, null, lastName);

      Checking whether the property is set (not empty) will solve this.

      Attachments

        1. EbayOrderServices.java.patch
          2 kB
          Norbert Rieger

        Activity

          People

            jleroux Jacques Le Roux
            nrieger Norbert Rieger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: