summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-request-handler/appc-request-handler-core
diff options
context:
space:
mode:
authorvidhyasree <sn141y@att.com>2018-06-26 11:55:24 -0400
committerSantoshi Vidhyasree Nerella <sn141y@att.com>2018-06-26 19:04:33 +0000
commit902fc7abbb42e062ee4a08e84521c3e505fe012f (patch)
tree1f82164e7fb96f6cee28b2b76a438669e6c45486 /appc-dispatcher/appc-request-handler/appc-request-handler-core
parenta0e26d8b474fa91e6f4ec6bcbb2c53384821bd7a (diff)
Fix for invalid locking approach
Issue-ID: APPC-1019 Change-Id: I738c4ad72c29f494488a3fe3657243927797e2b5 Signed-off-by: vidhyasree <sn141y@att.com>
Diffstat (limited to 'appc-dispatcher/appc-request-handler/appc-request-handler-core')
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java
index 9d6c88883..aa6d203a5 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/onap/appc/requesthandler/impl/AbstractRequestHandlerImpl.java
@@ -74,7 +74,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
-
+import java.util.TimeZone;
import static com.att.eelf.configuration.Configuration.MDC_INSTANCE_UUID;
import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
import static com.att.eelf.configuration.Configuration.MDC_SERVER_FQDN;
@@ -226,11 +226,11 @@ public abstract class AbstractRequestHandlerImpl implements RequestHandler {
}
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.STATE, record.getRequestState());
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.RESULT_CODE,
- String.valueOf(record.getResultCode()));
+ String.valueOf(record.getResultCode()));
if (RequestStatus.valueOf(record.getRequestState()).isTerminal()) {
- Date endTime = new Date(System.currentTimeMillis());
+ Date endTime = new Date();
updateColumns.put(TransactionConstants.TRANSACTION_ATTRIBUTES.END_TIME,
- dateToStringConverterMillis(endTime));
+ dateToStringConverterMillis(endTime));
}
try {
transactionRecorder.update(record.getTransactionId(), updateColumns);
@@ -461,6 +461,7 @@ public abstract class AbstractRequestHandlerImpl implements RequestHandler {
public static String dateToStringConverterMillis(Date date) {
SimpleDateFormat customDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+ customDate.setTimeZone(TimeZone.getTimeZone("UTC"));
if (date != null) {
return customDate.format(date);
}