Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-1028

SF Connector: NPE when performing a PUT with null valued attribute

    Details

      Description

      Performing a PUT against a Salesforce object will throw a NPE if the payload includes a attribute whose value is null.  For example:

      curl -X PUT \
      http://localhost:8080/openidm/system/00Dq00000001QDD/User/005q0000004x3cNAAQ \
      -H 'Content-Type: application/json' \
      -H 'If-Match: *' \
      -H 'X-OpenIDM-Password: Welcome1' \
      -H 'X-OpenIDM-Username: AJA55' \
      -d '{
      "_id": "005q0000004x3cNAAQ",
      ...
      ...
      "OutOfOfficeMessage": null
      }

      Results in the following response:

      {
      "code": 500,
      "reason": "Internal Server Error",
      "message": "Internal Server Error"
      }
      

      And the following exception log:

      Caused by: java.lang.NullPointerException
      at org.forgerock.openicf.connectors.salesforce.resource.SalesforceResource.setResourceAttributes(SalesforceResource.java:156)
      at org.forgerock.openicf.connectors.salesforce.SalesforceConnector.update(SalesforceConnector.java:139)
      at org.identityconnectors.framework.impl.api.local.operations.UpdateImpl.update(UpdateImpl.java:88)
      

        Attachments

          Activity

            People

            • Assignee:
              cgdrake Chris Drake
              Reporter:
              cgdrake Chris Drake
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: