summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorh00397475 <hena.choudhury@huawei.com>2019-04-23 12:17:35 +0530
committerh00397475 <hena.choudhury@huawei.com>2019-04-23 12:23:32 +0530
commit30e943eaa87b80445f8dfd8bdf762dc8e9553456 (patch)
treec91cb6470b5a56658825cd4cc1032ab5fc0f7687
parentbe61cb67952b83ebac6f16b84cd5d94ebd638bad (diff)
Remove unused variables from class file.
Remove unused local variables from class files. Issue-ID: SO-1490 Change-Id: I8d0a39183883d97ab54ea04ce62f520247958a48 Signed-off-by: h00397475 <hena.choudhury@huawei.com>
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java13
2 files changed, 6 insertions, 9 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java
index 513ff74180..4e74e5d414 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/HomingV2.java
@@ -55,7 +55,7 @@ public class HomingV2 {
private boolean isOof(BuildingBlockExecution execution) {
for (Map<String, Object> params : execution.getGeneralBuildingBlock().getRequestContext().getRequestParameters()
.getUserParams()) {
- if (params.containsKey(HOMINGSOLUTION) && params.get(HOMINGSOLUTION).equals("oof")) {
+ if (params.containsKey(HOMINGSOLUTION) && ("oof").equals(params.get(HOMINGSOLUTION))) {
return true;
}
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
index 2696313daf..d5a085aba7 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/OofHomingV2.java
@@ -81,6 +81,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank;
@Component("OofHoming")
public class OofHomingV2 {
+ public static final String ERROR_WHILE_PREPARING_OOF_REQUEST = " Error - while preparing oof request: ";
private static final Logger logger = LoggerFactory.getLogger(OofHomingV2.class);
private JsonUtils jsonUtils = new JsonUtils();
@Autowired
@@ -91,13 +92,9 @@ public class OofHomingV2 {
private OofValidator oofValidator;
@Autowired
private ExceptionBuilder exceptionUtil;
- private static final String MODEL_NAME = "modelName";
private static final String MODEL_INVARIANT_ID = "modelInvariantId";
private static final String MODEL_VERSION_ID = "modelVersionId";
- private static final String MODEL_VERSION = "modelVersion";
private static final String SERVICE_RESOURCE_ID = "serviceResourceId";
- private static final String RESOURCE_MODULE_NAME = "resourceModuleName";
- private static final String RESOURCE_MODEL_INFO = "resourceModelInfo";
private static final String IDENTIFIER_TYPE = "identifierType";
private static final String SOLUTIONS = "solutions";
private static final String RESOURCE_MISSING_DATA = "Resource does not contain: ";
@@ -128,7 +125,7 @@ public class OofHomingV2 {
OofRequest oofRequest = new OofRequest();
- RequestInfo requestInfo = (RequestInfo) buildRequestInfo(requestId, timeout);
+ RequestInfo requestInfo = buildRequestInfo(requestId, timeout);
oofRequest.setRequestInformation(requestInfo);
ServiceInfo serviceInfo = buildServiceInfo(serviceInstance);
@@ -157,13 +154,13 @@ public class OofHomingV2 {
logger.trace("Completed Oof Homing Call Oof");
} catch (BpmnError e) {
- logger.debug(" Error - while preparing oof request: " + e.getStackTrace());
+ logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
exceptionUtil.buildAndThrowWorkflowException(execution, Integer.parseInt(e.getErrorCode()), e.getMessage());
} catch (BadResponseException e) {
- logger.debug(" Error - while preparing oof request: " + e.getStackTrace());
+ logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
exceptionUtil.buildAndThrowWorkflowException(execution, 400, e.getMessage());
} catch (Exception e) {
- logger.debug(" Error - while preparing oof request: " + e.getStackTrace());
+ logger.debug(ERROR_WHILE_PREPARING_OOF_REQUEST + e.getStackTrace());
exceptionUtil.buildAndThrowWorkflowException(execution, INTERNAL, "Internal Error - occurred while "
+ "preparing oof request: " + e + " Stack:" + ExceptionUtils.getFullStackTrace(e));
}