Sonar fixes in MsoVnfAdapterAsyncImpl 81/90381/1
authorr.bogacki <r.bogacki@samsung.com>
Mon, 24 Jun 2019 13:12:56 +0000 (15:12 +0200)
committerr.bogacki <r.bogacki@samsung.com>
Mon, 24 Jun 2019 13:13:07 +0000 (15:13 +0200)
General fixes and improvements according to the Sonar analysis.
-Removed unnecessary code.

Issue-ID: SO-1220
Signed-off-by: Robert Bogacki <r.bogacki@samsung.com>
Change-Id: I0f9ab1fe490975e4eefa31afd5bf09616f4de3f2

adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java

index b81efa3..6713c2d 100644 (file)
@@ -245,7 +245,6 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
     public void queryVnfA(String cloudSiteId, String cloudOwner, String tenantId, String vnfName, String messageId,
             MsoRequest msoRequest, String notificationUrl) {
 
-        String serviceName = "QueryVnfA";
         logger.info(LoggingAnchor.ONE, MessageEnum.RA_ASYNC_QUERY_VNF);
 
         // Use the synchronous method to perform the actual query
@@ -323,7 +322,6 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
     public void deleteVnfA(String cloudSiteId, String cloudOwner, String tenantId, String vnfName, String messageId,
             MsoRequest msoRequest, String notificationUrl) {
 
-        String serviceName = "DeleteVnfA";
         logger.info(LoggingAnchor.ONE, MessageEnum.RA_ASYNC_DELETE_VNF);
 
         // Use the synchronous method to perform the actual delete
@@ -460,7 +458,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
         CreateVnfNotification.Outputs outputs = new CreateVnfNotification.Outputs();
 
         if (hMap != null && hMap.value != null) {
-            Map<String, String> sMap = new HashMap<>();
+            Map<String, String> sMap;
             sMap = hMap.value;
             CreateVnfNotification.Outputs.Entry entry = new CreateVnfNotification.Outputs.Entry();
 
@@ -478,7 +476,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
         UpdateVnfNotification.Outputs outputs = new UpdateVnfNotification.Outputs();
 
         if (hMap != null && hMap.value != null) {
-            Map<String, String> sMap = new HashMap<>();
+            Map<String, String> sMap;
             sMap = hMap.value;
             UpdateVnfNotification.Outputs.Entry entry = new UpdateVnfNotification.Outputs.Entry();
 
@@ -498,7 +496,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
         QueryVnfNotification.Outputs outputs = new QueryVnfNotification.Outputs();
 
         if (hMap != null && hMap.value != null) {
-            Map<String, String> sMap = new HashMap<>();
+            Map<String, String> sMap;
             sMap = hMap.value;
 
             QueryVnfNotification.Outputs.Entry entry = new QueryVnfNotification.Outputs.Entry();