From 955fe4b4b5416f272f20c5e0bed47722f5c588f8 Mon Sep 17 00:00:00 2001 From: Nirothipan Date: Wed, 30 Aug 2017 16:50:26 +0530 Subject: [PATCH] checking message --- .../mgt/jaxrs/service/impl/UserManagementServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java index c45588b20c..e8272f6f88 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/UserManagementServiceImpl.java @@ -562,7 +562,7 @@ public class UserManagementServiceImpl implements UserManagementService { } } catch (DeviceManagementException e) { String msg = "Error occurred while inviting user to enrol their device"; - if (e.getMessage() != null) { + if (e.getMessage() != null && !e.getMessage().isEmpty()) { msg = e.getMessage(); } log.error(msg, e);