From f329bb33aa702aa96d44bd9403322fc28b1d786f Mon Sep 17 00:00:00 2001 From: Anil Patel Date: Mon, 8 Jun 2009 05:35:18 +0000 Subject: [PATCH] Fix NPE if statusId is not passed to service. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@782530 13f79535-47bb-0310-9956-ffa450edef68 --- applications/party/src/org/ofbiz/party/party/PartyServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/party/src/org/ofbiz/party/party/PartyServices.java b/applications/party/src/org/ofbiz/party/party/PartyServices.java index 8ba55535b1..3eba7ac1f9 100644 --- a/applications/party/src/org/ofbiz/party/party/PartyServices.java +++ b/applications/party/src/org/ofbiz/party/party/PartyServices.java @@ -306,7 +306,7 @@ public class PartyServices { return ServiceUtil.returnError(UtilProperties.getMessage(resource, "person.update.write_failure", new Object[] { e.getMessage() }, locale)); } - if (!context.get("statusId").equals(oldStatusId)) { + if (UtilValidate.isNotEmpty(context.get("statusId")) && !context.get("statusId").equals(oldStatusId)) { try { dispatcher.runSync("setPartyStatus", UtilMisc.toMap("partyId", partyId, "statusId", context.get("statusId"), "userLogin", context.get("userLogin"))); } catch (GenericServiceException e) {