Merge "Replace str literal for const, replace type spec"
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
index 4396fc0..9fc5c97 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/CXFConfiguration.java
@@ -89,7 +89,7 @@
     }
 
     @Bean
-    public ServletRegistrationBean SoapDispatcherServlet() {
+    public ServletRegistrationBean soapDispatcherServlet() {
         ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new CXFServlet(), "/services/*");
         servletRegistrationBean.setName("services");
         return servletRegistrationBean;
@@ -149,7 +149,7 @@
     }
 
     @Bean
-    public Endpoint VnfAsyncAdapterEndpoint() {
+    public Endpoint vnfAsyncAdapterEndpoint() {
         EndpointImpl endpoint = new EndpointImpl(springBus(), vnfAdapterAsyncImpl);
         endpoint.publish("/VnfAsyncAdapter");
         endpoint.setWsdlLocation("VnfAsyncAdapter.wsdl");
@@ -160,7 +160,7 @@
     }
 
     @Bean
-    public Endpoint VnfCloudAdapterEndpoint() {
+    public Endpoint vnfCloudAdapterEndpoint() {
         EndpointImpl endpoint = new EndpointImpl(springBus(), vnfCloudifyAdapterImpl);
         endpoint.publish("/VnfCloudifyAdapterImpl");
         endpoint.setWsdlLocation("VnfCloudifyAdapterImpl.wsdl");
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java
index 97a2500..4368364 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/MsoOpenstackAdaptersApplication.java
@@ -22,7 +22,6 @@
 
 import java.util.concurrent.Executor;
 import org.onap.so.logging.jaxrs.filter.MDCTaskDecorator;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index fe11fa0..d2dfae4 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -64,6 +64,7 @@
 
     private static final String BPEL_AUTH_PROP = "org.onap.so.adapters.vnf.bpelauth";
     private static final String ENCRYPTION_KEY_PROP = "org.onap.so.adapters.network.encryptionKey";
+    private static final String UPDATE_VNFA = "{} UpdateVnfA";
 
     @Autowired
     private Environment environment;
@@ -173,7 +174,7 @@
             String vnfName, String requestType, String volumeGroupHeatStackId, Map<String, Object> inputs,
             String messageId, MsoRequest msoRequest, String notificationUrl) {
 
-        logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF);
+        logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF);
 
         // Use the synchronous method to perform the actual Create
         MsoVnfAdapter vnfAdapter = vnfImpl;
@@ -207,7 +208,7 @@
                 logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
                         ErrorCode.BusinessProcesssError.getValue(), e1);
             }
-            logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
+            logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
             return;
         }
         logger.debug("Async Update VNF: {} VnfId:{}", vnfName, vnfId.value);
@@ -220,7 +221,7 @@
             logger.error("{} {} Exception sending updateVnf notification ", MessageEnum.RA_SEND_VNF_NOTIF_ERR,
                     ErrorCode.BusinessProcesssError.getValue(), e);
         }
-        logger.info("{} UpdateVnfA", MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
+        logger.info(UPDATE_VNFA, MessageEnum.RA_ASYNC_UPDATE_VNF_COMPLETE);
         return;
     }
 
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
index 2ea7ff4..9d6c944 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
@@ -79,12 +79,7 @@
 
     private static Logger logger = LoggerFactory.getLogger(MsoVnfCloudifyAdapterImpl.class);
 
-    private static final String MSO_CONFIGURATION_ERROR = "MsoConfigurationError";
-    private static final String VNF_ADAPTER_SERVICE_NAME = "MSO-BPMN:MSO-VnfAdapter.";
-    private static final String LOG_REPLY_NAME = "MSO-VnfAdapter:MSO-BPMN.";
     private static final String CHECK_REQD_PARAMS = "org.onap.so.adapters.vnf.checkRequiredParameters";
-    private static final String ADD_GET_FILES_ON_VOLUME_REQ = "org.onap.so.adapters.vnf.addGetFilesOnVolumeReq";
-    private static final String CLOUDIFY_RESPONSE_SUCCESS = "Successfully received response from Cloudify";
     private static final String CLOUDIFY = "Cloudify";
 
     private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
@@ -105,6 +100,15 @@
     protected MsoCloudifyUtils cloudifyUtils;
 
     /**
+     * DO NOT use that constructor to instantiate this class, the msoPropertiesfactory will be NULL.
+     *
+     * @see MsoVnfCloudifyAdapterImpl#MsoVnfAdapterImpl(MsoPropertiesFactory, CloudConfigFactory)
+     */
+    public MsoVnfCloudifyAdapterImpl() {
+
+    }
+
+    /**
      * Health Check web method. Does nothing but return to show the adapter is deployed.
      */
     @Override
@@ -113,15 +117,6 @@
     }
 
     /**
-     * DO NOT use that constructor to instantiate this class, the msoPropertiesfactory will be NULL.
-     * 
-     * @see MsoVnfCloudifyAdapterImpl#MsoVnfAdapterImpl(MsoPropertiesFactory, CloudConfigFactory)
-     */
-    public MsoVnfCloudifyAdapterImpl() {
-
-    }
-
-    /**
      * This is the "Create VNF" web service implementation. This function is now unsupported and will return an error.
      *
      */
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
index 2818652..18ba912 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIDeleteTasks.java
@@ -9,9 +9,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -58,8 +58,8 @@
 public class AAIDeleteTasks {
     private static final Logger logger = LoggerFactory.getLogger(AAIDeleteTasks.class);
 
-    private static String CONTRAIL_NETWORK_POLICY_FQDN_LIST = "contrailNetworkPolicyFqdnList";
-    private static String NETWORK_POLICY_FQDN_PARAM = "network-policy-fqdn";
+    private static String contrailNetworkPolicyFqdnList = "contrailNetworkPolicyFqdnList";
+    private static String networkPolicyFqdnParam = "network-policy-fqdn";
 
     @Autowired
     private ExceptionBuilder exceptionUtil;
@@ -176,15 +176,15 @@
 
     public void deleteNetworkPolicies(BuildingBlockExecution execution) {
         try {
-            String fqdns = execution.getVariable(CONTRAIL_NETWORK_POLICY_FQDN_LIST);
+            String fqdns = execution.getVariable(contrailNetworkPolicyFqdnList);
             if (fqdns != null && !fqdns.isEmpty()) {
-                String fqdnList[] = fqdns.split(",");
+                String[] fqdnList = fqdns.split(",");
                 int fqdnCount = fqdnList.length;
                 if (fqdnCount > 0) {
                     for (int i = 0; i < fqdnCount; i++) {
                         String fqdn = fqdnList[i];
                         AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.NETWORK_POLICY);
-                        uri.queryParam(NETWORK_POLICY_FQDN_PARAM, fqdn);
+                        uri.queryParam(networkPolicyFqdnParam, fqdn);
                         Optional<NetworkPolicies> oNetPolicies = aaiNetworkResources.getNetworkPolicies(uri);
                         if (oNetPolicies.isPresent()) {
                             NetworkPolicies networkPolicies = oNetPolicies.get();
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
index 499246d..91030d8 100644
--- a/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
+++ b/common/src/main/java/org/onap/so/client/aai/AAIVersion.java
@@ -25,7 +25,7 @@
 public enum AAIVersion implements GraphInventoryVersion {
     V13("v13"), V14("v14"), V15("v15");
 
-    public final static AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
+    public static final AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1];
     private final String value;
 
     private AAIVersion(String value) {
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java
index 16a4c17..45f2c96 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/bulkprocess/OperationBody.java
@@ -23,7 +23,6 @@
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRawValue;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 
 @JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java
index 5d28013..b2d67af 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/singletransaction/OperationBodyRequest.java
@@ -23,7 +23,6 @@
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
-import com.fasterxml.jackson.annotation.JsonRawValue;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 
 @JsonInclude(JsonInclude.Include.NON_NULL)
diff --git a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
index 1d85dac..68b4e84 100644
--- a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
+++ b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java
@@ -23,7 +23,6 @@
 import java.net.URL;
 import java.util.Map;
 import org.onap.so.client.RestClient;
-import org.onap.so.utils.CryptoUtils;
 import org.onap.so.utils.TargetEntity;
 
 public class DMaaPRestClient extends RestClient {
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
index 992d1f0..5fc8726 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/GraphInventoryTransactionClient.java
@@ -27,8 +27,6 @@
 import javax.ws.rs.NotFoundException;
 import javax.ws.rs.core.GenericType;
 import org.onap.aai.domain.yang.Relationship;
-import org.onap.so.client.aai.AAIVersion;
-import org.onap.so.client.aai.entities.singletransaction.SingleTransactionRequest;
 import org.onap.so.client.graphinventory.entities.GraphInventoryEdgeLabel;
 import org.onap.so.client.graphinventory.entities.uri.GraphInventoryResourceUri;
 import org.onap.so.client.graphinventory.exceptions.BulkProcessFailed;
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java
index 892951f..6703416 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/GraphInventoryRelationships.java
@@ -27,10 +27,6 @@
 import java.util.Map;
 import java.util.Optional;
 import java.util.function.Predicate;
-import org.onap.so.client.aai.AAICommonObjectMapperProvider;
-import org.onap.so.client.aai.AAIObjectType;
-import org.onap.so.client.aai.entities.AAIResultWrapper;
-import org.onap.so.client.aai.entities.uri.AAIResourceUri;
 import org.onap.so.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
 import org.onap.so.client.graphinventory.GraphInventoryObjectName;
 import org.onap.so.client.graphinventory.GraphInventoryObjectType;
diff --git a/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java b/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java
index fa155de..507f113 100644
--- a/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java
+++ b/common/src/main/java/org/onap/so/client/grm/GRMRestClient.java
@@ -22,11 +22,9 @@
 
 
 import java.net.URI;
-import java.util.Base64;
 import java.util.Map;
 import java.util.Optional;
 import org.onap.so.client.RestClient;
-import org.onap.so.client.RestProperties;
 import org.onap.so.utils.TargetEntity;
 
 public class GRMRestClient extends RestClient {
diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java
index 975f6bb..5dbf88d 100644
--- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java
+++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsClientLogging.java
@@ -21,34 +21,24 @@
 package org.onap.so.logging.jaxrs.filter;
 
 
-import org.apache.commons.io.IOUtils;
 import org.onap.logging.ref.slf4j.ONAPLogConstants;
 import org.onap.so.utils.TargetEntity;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
-import org.slf4j.MarkerFactory;
 import org.springframework.stereotype.Component;
 import javax.annotation.Priority;
 import javax.ws.rs.client.ClientRequestContext;
 import javax.ws.rs.client.ClientRequestFilter;
 import javax.ws.rs.client.ClientResponseContext;
 import javax.ws.rs.client.ClientResponseFilter;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerResponseContext;
 import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Providers;
-import java.io.*;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
 import java.time.ZoneOffset;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.Map;
 import java.util.UUID;
 
 @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
diff --git a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
index 635d95b..4741f7f 100644
--- a/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
+++ b/common/src/main/java/org/onap/so/logging/jaxrs/filter/JaxRsFilterLogging.java
@@ -46,7 +46,6 @@
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
-import com.fasterxml.jackson.databind.ObjectMapper;
 
 @Priority(1)
 @Provider
diff --git a/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java b/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java
index 8e7a95b..fa5a5d5 100644
--- a/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java
+++ b/common/src/main/java/org/onap/so/logging/spring/interceptor/LoggingInterceptor.java
@@ -30,7 +30,6 @@
 import javax.ws.rs.core.Response;
 import javax.ws.rs.ext.Providers;
 import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import org.onap.so.logger.LogConstants;
 import org.onap.so.logging.jaxrs.filter.MDCSetup;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java b/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java
index fc9bb38..9062f60 100644
--- a/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java
+++ b/common/src/main/java/org/onap/so/openpojo/rules/HasAnnotationMatcher.java
@@ -22,7 +22,6 @@
 
 import static org.hamcrest.CoreMatchers.anything;
 import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
 import org.hamcrest.Description;
 import org.hamcrest.Matcher;
 import org.hamcrest.TypeSafeDiagnosingMatcher;
diff --git a/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java b/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java
index 53ce388..7c1df67 100644
--- a/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java
+++ b/common/src/main/java/org/onap/so/serviceinstancebeans/GetOrchestrationResponse.java
@@ -23,7 +23,6 @@
 import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.annotation.JsonInclude.Include;
 import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 
 @JsonInclude(Include.NON_DEFAULT)
 public class GetOrchestrationResponse {
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
index 449aa4b..3996d51 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/E2EServiceInstances.java
@@ -928,21 +928,14 @@
         // subscriptionServiceType
         requestParameters.setSubscriptionServiceType("MOG");
 
-        // Userparams
-        // List<E2EUserParam> userParams;
-        // userParams =
-        // e2eSir.getService().getParameters().getRequestParameters().getUserParams();
+
         List<Map<String, Object>> userParamList = new ArrayList<>();
         Map<String, Object> userParamMap = new HashMap<>();
         // complete json request updated in the camunda
         userParamMap.put("UUIRequest", requestJSON);
         userParamMap.put("ServiceInstanceName", e2eSir.getService().getName());
 
-        // Map<String, String> userParamMap3 = null;
-        // for (E2EUserParam userp : userParams) {
-        // userParamMap.put(userp.getName(), userp.getValue());
-        //
-        // }
+
         userParamList.add(userParamMap);
         requestParameters.setUserParams(userParamList);