diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/EventOperationExecutor.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/EventOperationExecutor.java index aa40af5025a..937706c219d 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/EventOperationExecutor.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/EventOperationExecutor.java @@ -38,9 +38,6 @@ import org.wso2.carbon.device.mgt.common.group.mgt.DeviceGroup; import org.wso2.carbon.device.mgt.common.group.mgt.GroupManagementException; import org.wso2.carbon.device.mgt.common.operation.mgt.Operation; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException; -import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory; -import org.wso2.carbon.device.mgt.core.dao.EventConfigDAO; -import org.wso2.carbon.device.mgt.core.dao.GeofenceDAO; import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder; import org.wso2.carbon.device.mgt.core.operation.mgt.OperationMgtConstants; import org.wso2.carbon.device.mgt.core.operation.mgt.ProfileOperation; @@ -61,8 +58,6 @@ public class EventOperationExecutor implements Runnable { private static final Log log = LogFactory.getLog(EventOperationExecutor.class); private final GroupManagementProviderService groupManagementService; - private final EventConfigDAO eventConfigDAO; - private final GeofenceDAO geofenceDAO; private final List groupIds; private final String eventSource; private final EventMetaData eventMetaData; @@ -72,8 +67,6 @@ public class EventOperationExecutor implements Runnable { public EventOperationExecutor(EventMetaData eventMetaData, List groupIds, int tenantId, String eventSource, String operationCode) { this.groupManagementService = DeviceManagementDataHolder.getInstance().getGroupManagementProviderService(); - this.eventConfigDAO = DeviceManagementDAOFactory.getEventConfigDAO(); - this.geofenceDAO = DeviceManagementDAOFactory.getGeofenceDAO(); this.eventMetaData = eventMetaData; this.groupIds = groupIds; this.tenantId = tenantId; @@ -223,11 +216,9 @@ public class EventOperationExecutor implements Runnable { //TODO introduce a proper mechanism } catch (OperationManagementException e) { log.error("Creating event operation failed with error ", e); - return; } catch (InvalidDeviceException e) { log.error("Creating event operation failed.\n" + "Could not found device/devices for the defined device identifiers.", e); - return; } } } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/GroupAssignmentEventOperationExecutor.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/GroupAssignmentEventOperationExecutor.java index 546616c0d9c..0179c9199ed 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/GroupAssignmentEventOperationExecutor.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/event/config/GroupAssignmentEventOperationExecutor.java @@ -86,15 +86,13 @@ public class GroupAssignmentEventOperationExecutor implements Runnable { try { this.eventSources = eventConfigurationService.getEventsSourcesOfGroup(groupId, tenantId); if (this.eventSources == null || this.eventSources.isEmpty()) { - String msg = "No events applied for queried group with ID " + groupId; if (log.isDebugEnabled()) { - log.debug(msg); + log.debug("No configured events for the queried group with ID " + groupId); } return; } } catch (EventConfigurationException e) { - String msg = "Failed while retrieving event records of group " + groupId + "of the tenant " + tenantId; - log.error(msg, e); + log.error("Failed while retrieving event records of group " + groupId + "of the tenant " + tenantId, e); return; }