diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java
index f4cfb13..93e4aee 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/test/emulators/ArtifactInfoImpl.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * 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
@@ -59,7 +61,7 @@
     }
 
     public static List<ArtifactInfoImpl> convertToArtifactInfoImpl(List<IArtifactInfo> list) {
-        List<ArtifactInfoImpl> ret = new ArrayList<ArtifactInfoImpl>();
+        List<ArtifactInfoImpl> ret = new ArrayList<>();
         if (list != null) {
             for (IArtifactInfo artifactInfo : list) {
                 ret.add(new ArtifactInfoImpl(artifactInfo));
@@ -159,7 +161,7 @@
 
     @Override
     public List<IArtifactInfo> getRelatedArtifacts() {
-        List<IArtifactInfo> temp = new ArrayList<IArtifactInfo>();
+        List<IArtifactInfo> temp = new ArrayList<>();
         if (relatedArtifactsInfo != null) {
             temp.addAll(relatedArtifactsImpl);
         }
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
index bba8064..b57bb5d 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/WorkflowSpecificationsHandler.java
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
  * 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
@@ -91,13 +93,13 @@
         List<Workflow> workflows = catalogDbClient.findWorkflowByModelUUID(vnfModelVersionId);
 
         List<Workflow> nativeWorkflows = catalogDbClient.findWorkflowBySource(NATIVE_WORKFLOW);
-        if (nativeWorkflows != null && nativeWorkflows.size() != 0) {
+        if (nativeWorkflows != null && !nativeWorkflows.isEmpty()) {
             workflows.addAll(nativeWorkflows);
         }
 
         WorkflowSpecifications workflowSpecifications = mapWorkflowsToWorkflowSpecifications(workflows);
 
-        String jsonResponse = null;
+        String jsonResponse;
         try {
             ObjectMapper mapper = new ObjectMapper();
             jsonResponse = mapper.writeValueAsString(workflowSpecifications);
@@ -116,11 +118,11 @@
     }
 
     protected WorkflowSpecifications mapWorkflowsToWorkflowSpecifications(List<Workflow> workflows) {
-        if (workflows == null || workflows.size() == 0) {
+        if (workflows == null || workflows.isEmpty()) {
             return null;
         }
         WorkflowSpecifications workflowSpecifications = new WorkflowSpecifications();
-        List<WorkflowSpecificationList> workflowSpecificationList = new ArrayList<WorkflowSpecificationList>();
+        List<WorkflowSpecificationList> workflowSpecificationList = new ArrayList<>();
 
         for (Workflow workflow : workflows) {
             WorkflowSpecificationList workflowSpecificationListItem = new WorkflowSpecificationList();
@@ -153,10 +155,10 @@
 
     private List<ActivitySequence> buildActivitySequence(Workflow workflow) {
         List<WorkflowActivitySpecSequence> workflowActivitySpecSequences = workflow.getWorkflowActivitySpecSequence();
-        if (workflowActivitySpecSequences == null || workflowActivitySpecSequences.size() == 0) {
+        if (workflowActivitySpecSequences == null || workflowActivitySpecSequences.isEmpty()) {
             return null;
         }
-        List<ActivitySequence> activitySequences = new ArrayList<ActivitySequence>();
+        List<ActivitySequence> activitySequences = new ArrayList<>();
         for (WorkflowActivitySpecSequence workflowActivitySpecSequence : workflowActivitySpecSequences) {
             if (workflowActivitySpecSequence != null) {
                 ActivitySpec activitySpec = workflowActivitySpecSequence.getActivitySpec();
@@ -174,17 +176,17 @@
 
     private List<WorkflowInputParameter> buildWorkflowInputParameters(Workflow workflow) {
         List<WorkflowActivitySpecSequence> workflowActivitySpecSequences = workflow.getWorkflowActivitySpecSequence();
-        if (workflowActivitySpecSequences == null || workflowActivitySpecSequences.size() == 0) {
-            return new ArrayList<WorkflowInputParameter>();
+        if (workflowActivitySpecSequences == null || workflowActivitySpecSequences.isEmpty()) {
+            return new ArrayList<>();
         }
-        Map<String, WorkflowInputParameter> workflowInputParameterMap = new HashMap<String, WorkflowInputParameter>();
+        Map<String, WorkflowInputParameter> workflowInputParameterMap = new HashMap<>();
         for (WorkflowActivitySpecSequence workflowActivitySpecSequence : workflowActivitySpecSequences) {
             if (workflowActivitySpecSequence != null) {
                 ActivitySpec activitySpec = workflowActivitySpecSequence.getActivitySpec();
                 if (activitySpec != null) {
                     List<ActivitySpecUserParameters> activitySpecUserParameters =
                             activitySpec.getActivitySpecUserParameters();
-                    if (activitySpecUserParameters != null && activitySpecUserParameters.size() != 0) {
+                    if (activitySpecUserParameters != null && !activitySpecUserParameters.isEmpty()) {
                         for (ActivitySpecUserParameters activitySpecUserParameter : activitySpecUserParameters) {
                             UserParameters userParameter = activitySpecUserParameter.getUserParameters();
                             if (userParameter != null) {
@@ -199,7 +201,7 @@
         }
 
         if (workflowInputParameterMap.size() == 0) {
-            return new ArrayList<WorkflowInputParameter>();
+            return new ArrayList<>();
         }
         List<WorkflowInputParameter> workflowInputParameterList =
                 workflowInputParameterMap.values().stream().collect(Collectors.toList());
@@ -220,7 +222,7 @@
     private List<Validation> buildValidationList(UserParameters userParameter) {
         List<Validation> validationList = null;
         if (userParameter.getMaxLength() != null || userParameter.getAllowableChars() != null) {
-            validationList = new ArrayList<Validation>();
+            validationList = new ArrayList<>();
             Validation validation = new Validation();
             if (userParameter.getMaxLength() != null) {
                 validation.setMaxLength(userParameter.getMaxLength().toString());
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java
index b2933df..2165884 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/ModelDistributionRequest.java
@@ -75,8 +75,7 @@
     @Transactional
     public Response updateModelDistributionStatus(String requestJSON, @PathParam("version") String version,
             @PathParam("distributionId") String distributionId) throws ApiException {
-        long startTime = System.currentTimeMillis();
-        Distribution distributionRequest = null;
+        Distribution distributionRequest;
 
         try {
             ObjectMapper mapper = new ObjectMapper();
@@ -146,7 +145,7 @@
         }
         re.setServiceException(se);
 
-        String requestErrorStr = null;
+        String requestErrorStr;
         try {
             ObjectMapper mapper = new ObjectMapper();
             mapper.setSerializationInclusion(Include.NON_DEFAULT);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironment.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironment.java
index fe81a07..5eb4a67 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironment.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/process/CreateVnfOperationalEnvironment.java
@@ -145,7 +145,7 @@
             throws TenantIsolationException {
         List<ServiceEndPoint> endpointList = serviceEndPointList.getServiceEndPointList();
         logger.debug("Number of service endpoints from GRM: {}", endpointList.size());
-        List<ServiceEndPointRequest> serviceEndPointRequestList = new ArrayList<ServiceEndPointRequest>();
+        List<ServiceEndPointRequest> serviceEndPointRequestList = new ArrayList<>();
         for (ServiceEndPoint serviceEndpoint : endpointList) {
             serviceEndPointRequestList.add(buildServiceEndpoint(serviceEndpoint));
         }
