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

NPE in EbayOrderServices.createShoppingCart

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: Trunk
    • Component/s: ebay
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: