Fix Sonar bugs

In service java package Blocker issues fixed

Change-Id: I5c6ff6374c40d8e24c4fa920ca2af139761b9e4a
Issue-Id: CLAMP-43
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index c0f7111..3d6d54a 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -23,6 +23,14 @@
 
 package org.onap.clamp.clds.service;
 
+import com.att.ajsc.common.AjscService;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.sql.SQLException;
@@ -52,7 +60,6 @@
 import org.apache.commons.lang3.StringUtils;
 import org.camunda.bpm.engine.RuntimeService;
 import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.jboss.resteasy.spi.BadRequestException;
 import org.onap.clamp.clds.client.DcaeDispatcherServices;
 import org.onap.clamp.clds.client.DcaeInventoryServices;
 import org.onap.clamp.clds.client.SdcCatalogServices;
@@ -79,14 +86,6 @@
 import org.springframework.http.HttpStatus;
 import org.springframework.web.client.HttpClientErrorException;
 
-import com.att.ajsc.common.AjscService;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.node.ObjectNode;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
@@ -595,14 +594,13 @@
      *
      * @param test
      * @param dcaeEvent
-     * @throws BadRequestException
      */
     @ApiOperation(value = "Accepts events for a model", notes = "", response = String.class)
     @POST
     @Path("/dcae/event")
     @Consumes(MediaType.APPLICATION_JSON)
     @Produces(MediaType.APPLICATION_JSON)
-    public String postDcaeEvent(@QueryParam("test") String test, DcaeEvent dcaeEvent) throws BadRequestException {
+    public String postDcaeEvent(@QueryParam("test") String test, DcaeEvent dcaeEvent) {
         Date startTime = new Date();
         LoggingUtils.setRequestContext("CldsService: Post dcae event", getPrincipalName());
         String userid = null;
@@ -929,7 +927,7 @@
             }
             operationStatus = dcaeDispatcherServices.getOperationStatus(createNewDeploymentStatusUrl);
         }
-        if (operationStatus != null && operationStatus.equalsIgnoreCase("succeeded")) {
+        if (operationStatus.equalsIgnoreCase("succeeded")) {
             String artifactName = model.getControlName();
             if (artifactName != null) {
                 artifactName = artifactName + ".yml";
@@ -973,7 +971,7 @@
             }
             operationStatus = dcaeDispatcherServices.getOperationStatus(operationStatusUndeployUrl);
         }
-        if (operationStatus != null && operationStatus.equalsIgnoreCase("succeeded")) {
+        if (operationStatus.equalsIgnoreCase("succeeded")) {
             String artifactName = model.getControlName();
             if (artifactName != null) {
                 artifactName = artifactName + ".yml";
diff --git a/src/main/java/org/onap/clamp/clds/service/LogServiceImpl.java b/src/main/java/org/onap/clamp/clds/service/LogServiceImpl.java
index f38e129..2f02aa6 100644
--- a/src/main/java/org/onap/clamp/clds/service/LogServiceImpl.java
+++ b/src/main/java/org/onap/clamp/clds/service/LogServiceImpl.java
@@ -23,6 +23,12 @@
 
 package org.onap.clamp.clds.service;
 
+import com.att.ajsc.camunda.core.AttCamundaHistoryEvent;
+import com.att.ajsc.camunda.core.AttCamundaService;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.google.gson.Gson;
+
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -51,25 +57,19 @@
 import org.springframework.mail.javamail.JavaMailSenderImpl;
 import org.springframework.stereotype.Service;
 
-import com.att.ajsc.camunda.core.AttCamundaHistoryEvent;
-import com.att.ajsc.camunda.core.AttCamundaService;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import com.google.gson.Gson;
-
 @Service
 public class LogServiceImpl implements LogService {
-    protected static final EELFLogger       logger      = EELFManager.getInstance().getLogger(LogServiceImpl.class);
+    protected static final EELFLogger logger      = EELFManager.getInstance().getLogger(LogServiceImpl.class);
     protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
 
     @Autowired
-    private RuntimeService          runtimeService;
+    private RuntimeService            runtimeService;
 
     @Autowired
-    private HistoryService          historyService;
+    private HistoryService            historyService;
 
     @Context
-    private MessageContext          context;
+    private MessageContext            context;
 
     public void setRuntimeService(RuntimeService runtimeService) {
         this.runtimeService = runtimeService;
@@ -165,7 +165,6 @@
                 if (classUrl != null) {
                     logger.info(LogMessages.LOGSERVICE_EMAIL_CLASS, classUrl.getFile());
                 } else {
-                    logger.info(LogMessages.LOGSERVICE_EMAIL_CLASS, classUrl.getFile());
                     logger.info(LogMessages.LOGSERVICE_EMAIL_CLASS_NULL);
                 }
                 email.send();