diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java index 3039d0d7651..b2e593291d6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/OperationManagerImpl.java @@ -72,7 +72,6 @@ public class OperationManagerImpl implements OperationManager { @Override public int addOperation(Operation operation, List deviceIds) throws OperationManagementException { - if (log.isDebugEnabled()) { log.debug("operation:[" + operation.toString() + "]"); for (DeviceIdentifier deviceIdentifier : deviceIds) { @@ -464,9 +463,8 @@ public class OperationManagerImpl implements OperationManager { } operation = OperationDAOUtil.convertOperation(dtoOperation); } catch (OperationManagementDAOException e) { - String errorMsg = "Error occurred while retrieving the operation with operation Id '" + operationId; - log.error(errorMsg, e); - throw new OperationManagementException(errorMsg, e); + throw new OperationManagementException("Error occurred while retrieving the operation with operation Id '" + + operationId, e); } catch (SQLException e) { throw new OperationManagementException("Error occurred while opening a connection to the data source", e); } finally {