From 9f5aaf9b22db9555edd970d37761c65ddf0902da Mon Sep 17 00:00:00 2001 From: Seshu-Kumar-M Date: Tue, 22 Aug 2017 18:00:56 +0800 Subject: IssueId : SO-98 Desc: Sonar issue fix Change-Id: I48e45fb9fd51bac3e79feaa47d3078b6614025cf Signed-off-by: Seshu-Kumar-M --- .../network/MsoNetworkAdapterAsyncImpl.java | 27 ++++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'adapters/mso-network-adapter/src') diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java index c643443791..d697182c90 100644 --- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java +++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/MsoNetworkAdapterAsyncImpl.java @@ -61,7 +61,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { CloudConfigFactory cloudConfigFactory=new CloudConfigFactory(); public static final String MSO_PROP_NETWORK_ADAPTER="MSO_PROP_NETWORK_ADAPTER"; - private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); + private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger (); private static final String BPEL_AUTH_PROP = "org.openecomp.mso.adapters.network.bpelauth"; private static final String ENCRYPTION_KEY = "aa3871669d893c7fb8abbcda31b88b4f"; @@ -116,8 +116,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoRequest msoRequest, String notificationUrl) { String error; - // Will capture execution time for metrics - long startTime = System.currentTimeMillis (); + MsoLogger.setLogContext (msoRequest); MsoLogger.setServiceName ("CreateNetworkA"); LOGGER.debug ("Async Create Network: " + networkName @@ -234,8 +233,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoRequest msoRequest, String notificationUrl) { String error; - // Will capture execution time for metrics - long startTime = System.currentTimeMillis (); + String serviceName = "UpdateNetworkA"; MsoLogger.setServiceName (serviceName); MsoLogger.setLogContext (msoRequest); @@ -251,8 +249,8 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory); // Synchronous Web Service Outputs - Holder networkRollback = new Holder (); - Holder > subnetIdMap = new Holder > (); + Holder networkRollback = new Holder <> (); + Holder > subnetIdMap = new Holder <> (); try { networkAdapter.updateNetwork (cloudSiteId, @@ -323,8 +321,7 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoRequest msoRequest, String notificationUrl) { String error; - // Will capture execution time for metrics - long startTime = System.currentTimeMillis (); + MsoLogger.setLogContext (msoRequest); String serviceName = "QueryNetworkA"; MsoLogger.setServiceName (serviceName); @@ -334,12 +331,12 @@ public class MsoNetworkAdapterAsyncImpl implements MsoNetworkAdapterAsync { MsoNetworkAdapter networkAdapter = new MsoNetworkAdapterImpl (msoPropertiesFactory,cloudConfigFactory); // Synchronous Web Service Outputs - Holder networkExists = new Holder (); - Holder networkId = new Holder (); - Holder neutronNetworkId = new Holder (); - Holder status = new Holder (); - Holder > vlans = new Holder > (); - Holder > subnetIdMap = new Holder > (); + Holder networkExists = new Holder <> (); + Holder networkId = new Holder <> (); + Holder neutronNetworkId = new Holder <> (); + Holder status = new Holder <> (); + Holder > vlans = new Holder <> (); + Holder > subnetIdMap = new Holder <> (); try { networkAdapter.queryNetwork (cloudSiteId, -- cgit 1.2.3-korg