From 00c7dd0c632fff35254ac31c02b9ab1cac73c86b Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Wed, 30 Aug 2017 17:07:10 +0530 Subject: [PATCH] Resolved wso2/product-iots#1358 --- .../operation/mgt/dao/impl/GenericOperationDAOImpl.java | 9 --------- 1 file changed, 9 deletions(-) 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/GenericOperationDAOImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java index b0cc226c43..7e174ec714 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/operation/mgt/dao/impl/GenericOperationDAOImpl.java @@ -182,16 +182,7 @@ public class GenericOperationDAOImpl implements OperationDAO { stmt.setString(3, Operation.Status.PENDING.toString()); // This will return only one result always. rs = stmt.executeQuery(); - int id = 0; if (rs.next()) { - id = rs.getInt("ID"); - } - if (id != 0) { - stmt = connection.prepareStatement( - "UPDATE DM_ENROLMENT_OP_MAPPING SET UPDATED_TIMESTAMP = ? " + "WHERE ID = ?"); - stmt.setLong(1, System.currentTimeMillis() / 1000); - stmt.setInt(2, id); - stmt.executeUpdate(); result = true; } } catch (SQLException e) {