aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src
diff options
context:
space:
mode:
authorr.bogacki <r.bogacki@samsung.com>2019-07-09 13:31:36 +0200
committerr.bogacki <r.bogacki@samsung.com>2019-07-09 13:31:57 +0200
commit586b9e02a7a4a3ccef45a760e837db892209e6cb (patch)
tree09a3f48215f6f0f7fe04f10755de490fcaabdf0b /mso-api-handlers/mso-api-handler-infra/src
parentab9522a55b6cf8dd2137f635b1accef60de34d20 (diff)
Sonar fixes in ManualTasks
Code fixes in ManualTasks according to the Sonar analysis. -Removed unnecessary code. -Removed unused imports. -Removed unused variables. Issue-ID: SO-2100 Signed-off-by: Robert Bogacki <r.bogacki@samsung.com> Change-Id: I79848456cc88b7f2cb812f7054bb6cec12b584c0
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java
index 113baf96e6..b9b7fcc0d4 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/ManualTasks.java
@@ -50,8 +50,6 @@ import org.onap.so.apihandlerinfra.tasksbeans.TaskRequestReference;
import org.onap.so.apihandlerinfra.tasksbeans.TasksRequest;
import org.onap.so.apihandlerinfra.tasksbeans.Value;
import org.onap.so.apihandlerinfra.tasksbeans.Variables;
-import org.onap.so.constants.Status;
-import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.exceptions.ValidationException;
import org.onap.so.logger.ErrorCode;
import org.onap.so.logger.MessageEnum;
@@ -94,7 +92,6 @@ public class ManualTasks {
String requestId = requestContext.getProperty("requestId").toString();
logger.info(LoggingAnchor.TWO, MessageEnum.APIH_GENERATED_REQUEST_ID.toString(), requestId);
- long startTime = System.currentTimeMillis();
logger.debug("requestId is: {}", requestId);
TasksRequest taskRequest = null;
String apiVersion = version.substring(1);
@@ -141,9 +138,6 @@ public class ManualTasks {
throw validateException;
}
- // Create Request Record
- InfraActiveRequests currentActiveReq =
- msoRequest.createRequestObject(taskRequest, Action.completeTask, requestId, Status.PENDING, request);
// Transform the request to Camunda-style Complete request
Variables variablesForComplete = new Variables();
@@ -157,7 +151,7 @@ public class ManualTasks {
variablesForComplete.setResponseValue(responseValue);
variablesForComplete.setRequestorId(requestorIdValue);
- String camundaJsonReq = null;
+ String camundaJsonReq;
try {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
@@ -176,9 +170,8 @@ public class ManualTasks {
throw validateException;
}
- RequestClient requestClient = null;
- HttpResponse response = null;
- long subStartTime = System.currentTimeMillis();
+ RequestClient requestClient;
+ HttpResponse response;
String requestUrl = taskUri + "/" + taskId + "/complete";
try {
requestClient = reqClientFactory.getRequestClient(requestUrl);