Skip to content

Commit

Permalink
NPE in CRM Contact addresses returned by VirtuousCrmService
Browse files Browse the repository at this point in the history
  • Loading branch information
brmeyer committed Jun 26, 2023
1 parent 6d59bd9 commit c57c4f1
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,16 @@ private String getContactMethodValue(VirtuousClient.ContactIndividual contactInd
}

private CrmAddress getCrmAddress(VirtuousClient.Address address) {
if (address == null) {
return null;
}
CrmAddress crmAddress = new CrmAddress();
crmAddress.country = address.country;
crmAddress.state = address.state;
crmAddress.city = address.city;
crmAddress.postalCode = address.postal;
crmAddress.street = address.address1;

if (address != null) {
crmAddress.country = address.country;
crmAddress.state = address.state;
crmAddress.city = address.city;
crmAddress.postalCode = address.postal;
crmAddress.street = address.address1;
}

return crmAddress;
}

Expand Down

0 comments on commit c57c4f1

Please sign in to comment.