Merge "Code Enhancement (Sonar Fixes)"
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AAIObjectAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AAIObjectAudit.java
index 149de0b..0a186cc 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AAIObjectAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AAIObjectAudit.java
@@ -2,7 +2,6 @@
 
 import java.io.Serializable;
 import java.net.URI;
-import org.onap.so.client.aai.AAIObjectType;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 
 public class AAIObjectAudit implements Serializable {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java
index d46229a..947c6dd 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditCreateStackService.java
@@ -27,14 +27,11 @@
 import java.util.Optional;
 import org.camunda.bpm.client.task.ExternalTask;
 import org.camunda.bpm.client.task.ExternalTaskService;
-import org.onap.logging.ref.slf4j.ONAPLogConstants;
 import org.onap.so.audit.beans.AuditInventory;
 import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
 
@@ -47,7 +44,7 @@
     public HeatStackAudit heatStackAudit;
 
     @Autowired
-    public Environment env;
+    public Environment environment;
 
     protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
         AuditInventory auditInventory = externalTask.getVariable("auditInventory");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java
index aca6e9e..048e6db 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditDeleteStackService.java
@@ -25,12 +25,10 @@
 import java.util.Optional;
 import org.camunda.bpm.client.task.ExternalTask;
 import org.camunda.bpm.client.task.ExternalTaskService;
-import org.onap.logging.ref.slf4j.ONAPLogConstants;
 import org.onap.so.audit.beans.AuditInventory;
 import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Component;
@@ -44,7 +42,7 @@
     public HeatStackAudit heatStackAudit;
 
     @Autowired
-    public Environment env;
+    public Environment environment;
 
     protected void executeExternalTask(ExternalTask externalTask, ExternalTaskService externalTaskService) {
         AuditInventory auditInventory = externalTask.getVariable("auditInventory");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
index 5c0d2d3..627f6a2 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/HeatStackAudit.java
@@ -54,6 +54,8 @@
 
     protected static final Logger logger = LoggerFactory.getLogger(HeatStackAudit.class);
 
+    private static final String exceptionMsg = "Error finding Path from Self Link";
+
     @Autowired
     protected MsoHeatUtils heat;
 
@@ -110,10 +112,10 @@
                     processNestedResourceGroup(cloudRegion, tenantId, vServersWithLInterface,
                             nestedResourceGroupResources);
                 } else
-                    throw new Exception("Error finding Path from Self Link");
+                    throw new Exception(exceptionMsg);
             } catch (Exception e) {
                 logger.error("Error Parsing Link to obtain Path", e);
-                throw new Exception("Error finding Path from Self Link");
+                throw new Exception(exceptionMsg);
             }
         }
     }
@@ -143,7 +145,7 @@
                 addSubInterfaceToVserver(vServersWithLInterface, subinterfaceStack, subinterfaceResources);
             }
         } else
-            throw new Exception("Error finding Path from Self Link");
+            throw new Exception(exceptionMsg);
 
     }
 
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java
index 76881bd..b1908d9 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/ContrailSubnetHostRoutes.java
@@ -29,23 +29,23 @@
 public class ContrailSubnetHostRoutes {
 
     @JsonProperty("network_ipam_refs_data_ipam_subnets_host_routes_route")
-    private List<ContrailSubnetHostRoute> host_routes = new ArrayList<ContrailSubnetHostRoute>();
+    private List<ContrailSubnetHostRoute> hostRoutes = new ArrayList<>();
 
     public ContrailSubnetHostRoutes() {}
 
     public List<ContrailSubnetHostRoute> getHost_routes() {
-        return host_routes;
+        return hostRoutes;
     }
 
     public void setHost_routes(List<ContrailSubnetHostRoute> host_routes) {
-        this.host_routes = host_routes;
+        this.hostRoutes = host_routes;
     }
 
     @Override
     public String toString() {
         StringBuilder buf = new StringBuilder();
-        if (host_routes != null) {
-            for (ContrailSubnetHostRoute hr : host_routes) {
+        if (hostRoutes != null) {
+            for (ContrailSubnetHostRoute hr : hostRoutes) {
                 buf.append(hr.toString());
             }
         }