From 625ad6d1dcd452bff7e8b31b1308903177fb67bf Mon Sep 17 00:00:00 2001 From: DilanUA Date: Mon, 20 Apr 2015 20:58:19 +0530 Subject: [PATCH] Fixed some possible NPE issues in DeviceManagementServiceProviderImpl.java --- .../mgt/core/DeviceManagementServiceProviderImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java index a63770e738..4618a1703c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/DeviceManagementServiceProviderImpl.java @@ -243,8 +243,8 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ String subject = ""; for(NotificationMessages notificationMessage : notificationMessages){ - if (notificationMessage.getType().equals(DeviceManagementConstants.EmailNotifications - .ENROL_NOTIFICATION_TYPE)){ + if (DeviceManagementConstants.EmailNotifications.ENROL_NOTIFICATION_TYPE. + equals(notificationMessage.getType())) { messageHeader = notificationMessage.getHeader(); messageBody = notificationMessage.getBody(); messageFooter = notificationMessage.getFooter(); @@ -298,8 +298,8 @@ public class DeviceManagementServiceProviderImpl implements DeviceManagementServ String subject = ""; for(NotificationMessages notificationMessage : notificationMessages){ - if (notificationMessage.getType().equals(DeviceManagementConstants.EmailNotifications - .USER_REGISTRATION_NOTIFICATION_TYPE)){ + if (DeviceManagementConstants.EmailNotifications.USER_REGISTRATION_NOTIFICATION_TYPE. + equals(notificationMessage.getType())) { messageHeader = notificationMessage.getHeader(); messageBody = notificationMessage.getBody(); messageFooter = notificationMessage.getFooter();