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 a63770e7382..4618a1703ca 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(); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/OperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/OperationDAOImpl.java index b4d852f8a3e..8b73a4fe8d9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/OperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/OperationDAOImpl.java @@ -119,11 +119,11 @@ public class OperationDAOImpl implements OperationDAO { try { Connection conn = OperationManagementDAOFactory.getConnection(); String sql = "SELECT o.ID, o.TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, o.STATUS, o.OPERATION_CODE," + - "po.OPERATION_DETAILS,co.ENABLED from " + - "(SELECT ID, TYPE, CREATED_TIMESTAMP, RECEIVED_TIMESTAMP, STATUS, OPERATION_CODE FROM " + - " DM_OPERATION WHERE id=?) o" + - "LEFT OUTER JOIN DM_PROFILE_OPERATION po on o.ID =po.OPERATION_ID" + - "LEFT OUTER JOIN DM_COMMAND_OPERATION co on co.OPERATION_ID=o.ID"; + " po.OPERATION_DETAILS, co.ENABLED from" + + " (SELECT ID, TYPE, CREATED_TIMESTAMP, RECEIVED_TIMESTAMP, STATUS, OPERATION_CODE FROM " + + " DM_OPERATION WHERE id=?) o" + + " LEFT OUTER JOIN DM_PROFILE_OPERATION po on o.ID=po.OPERATION_ID" + + " LEFT OUTER JOIN DM_COMMAND_OPERATION co on co.OPERATION_ID=o.ID"; stmt = conn.prepareStatement(sql); stmt.setInt(1, id); @@ -184,7 +184,7 @@ public class OperationDAOImpl implements OperationDAO { try { Connection conn = OperationManagementDAOFactory.getConnection(); String sql = "SELECT o.ID, o.TYPE, o.CREATED_TIMESTAMP, o.RECEIVED_TIMESTAMP, o.STATUS, o.OPERATION_CODE," + - "po.OPERATION_DETAILS,co.ENABLED from " + + " po.OPERATION_DETAILS,co.ENABLED from " + "(SELECT ID, TYPE, CREATED_TIMESTAMP, RECEIVED_TIMESTAMP, STATUS, " + "OPERATION_CODE FROM DM_OPERATION WHERE id=?) o INNER JOIN (Select * from " + "DM_DEVICE_OPERATION_MAPPING dm where dm.OPERATION_ID=? AND dm.DEVICE_ID=?) om " +