summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDriptaroop Das <driptaroop.das@in.ibm.com>2019-04-01 22:57:27 +0530
committerJoss Armstrong <joss.armstrong@ericsson.com>2019-04-03 15:46:39 +0000
commit519ff3f34b42e41fbd995fe0c08a75f60a00be14 (patch)
tree47f03c4df705705bf509b990467efd39ea77928b
parent38ff7fdacf2d2e37cfa89f8e19f6375c6d216bc8 (diff)
RequestContext.java - sonar fixes
RequestContext.java - sonar fixes Issue-ID: APPC-1564 Change-Id: I334c1f07403cf246efb3413639fdb26cc08556af Signed-off-by: Driptaroop Das <driptaroop.das@in.ibm.com>
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java
index 8c2833dfc..5cea9c003 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java
@@ -125,6 +125,7 @@ public class RequestContext {
* amount of delay time needed and reenter the sleep until we get to the future time.
*/
time = future - System.currentTimeMillis();
+ Thread.currentThread().interrupt();
}
}
}
@@ -193,7 +194,7 @@ public class RequestContext {
}
accumulatedTime += (now - startTime);
startTime = now;
- return !(accumulatedTime > timeToLive);
+ return accumulatedTime <= timeToLive;
}
/**