From: Gary Wu Date: Tue, 9 May 2017 18:30:35 +0000 (-0700) Subject: Fix WorkflowContext.getDelay() unit conversion X-Git-Tag: v1.1.0~412^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=413e175d19e46ae7de47ed8199a530eca82e1771;p=so.git Fix WorkflowContext.getDelay() unit conversion The duration numbers in getDelay() are all expressed in milliseconds; the call to TimeUnit.convert() is fixed to specify milliseconds. Change-Id: I6b466f7a40a05ebe4afb1c3c39fb862eef2ae40d Signed-off-by: Gary Wu --- diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java index 3d7e333fdf..93aa15c59a 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowContext.java @@ -72,7 +72,7 @@ public class WorkflowContext implements Delayed { @Override public long getDelay(TimeUnit unit) { // 0 or negative means this object is considered to be expired - return unit.convert(startTime + timeout - System.currentTimeMillis(), unit); + return unit.convert(startTime + timeout - System.currentTimeMillis(), TimeUnit.MILLISECONDS); } /**