Fixed some possible NPE issues in DeviceManagementServiceProviderImpl.java

This commit is contained in:
DilanUA 2015-04-20 20:58:19 +05:30
parent 79444e951a
commit 625ad6d1dc

View File

@ -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();