Sonar Fix - Removed unnecessary cast to Date 56/91256/2
authorSudarshan Kumar <sudars19@in.ibm.com>
Thu, 11 Jul 2019 12:54:46 +0000 (18:24 +0530)
committerTakamune Cho <takamune.cho@att.com>
Mon, 15 Jul 2019 19:14:38 +0000 (19:14 +0000)
Sonar Fix - Removed unnecessary cast to Date

Issue-ID: APPC-1629
Change-Id: Ie37c511ac63abd71708700b376a836e4ed03e92f
Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/provider/operation/impl/StopServer.java

index 72b2ba2..d502a79 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (c) 2019 IBM
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -197,7 +199,7 @@ public class StopServer extends ProviderServerOperation {
     }
 
     private void setTimeForMetricsLogger() {
-        String timestamp = LoggingUtils.generateTimestampStr(((Date) new Date()).toInstant());
+        String timestamp = LoggingUtils.generateTimestampStr((new Date()).toInstant());
         MDC.put(LoggingConstants.MDCKeys.BEGIN_TIMESTAMP, timestamp);
         MDC.put(LoggingConstants.MDCKeys.END_TIMESTAMP, timestamp);
         MDC.put(LoggingConstants.MDCKeys.ELAPSED_TIME, "0");