diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java | 6 | ||||
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java index 1ee5acf0..62f93e63 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java @@ -75,7 +75,6 @@ public class DmiServiceImpl implements DmiService { this.ncmpRestClient = ncmpRestClient; this.objectMapper = objectMapper; this.sdncOperations = sdncOperations; - this.objectMapper = objectMapper; } @Override @@ -86,8 +85,7 @@ public class DmiServiceImpl implements DmiService { if (StringUtils.isEmpty(responseBody)) { throw new ModulesNotFoundException(cmHandle, "SDNC returned no modules for given cm-handle."); } - final ModuleSet moduleSet = createModuleSchema(responseBody); - return moduleSet; + return createModuleSchema(responseBody); } else { throw new DmiException("SDNC is not able to process request.", "response code : " + responseEntity.getStatusCode() + " message : " + responseEntity.getBody()); @@ -131,7 +129,7 @@ public class DmiServiceImpl implements DmiService { "Parsing error occurred while converting given cm-handles object list to JSON "); } final ResponseEntity<String> responseEntity = ncmpRestClient.registerCmHandlesWithNcmp(cmHandlesJson); - if (!(responseEntity.getStatusCode() == HttpStatus.CREATED)) { + if ((responseEntity.getStatusCode() != HttpStatus.CREATED)) { throw new CmHandleRegistrationException(responseEntity.getBody()); } } diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java b/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java index 2e1faf48..ab9c7e1d 100644 --- a/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java @@ -128,8 +128,7 @@ public class SdncOperations { @NotNull private String prepareGetSchemaUrl(final String nodeId) { - final var getSchemaUrl = addResource(addTopologyDataUrlwithNode(nodeId), GET_SCHEMA_URL); - return getSchemaUrl; + return addResource(addTopologyDataUrlwithNode(nodeId), GET_SCHEMA_URL); } private String prepareGetOperationSchemaUrl(final String nodeId) { @@ -142,8 +141,7 @@ public class SdncOperations { private String prepareResourceDataUrl(final String nodeId, final String resourceId, final List<String> queryList) { - final var resourceDataUrl = addQuery(addResource(addTopologyDataUrlwithNode(nodeId), resourceId), queryList); - return resourceDataUrl; + return addQuery(addResource(addTopologyDataUrlwithNode(nodeId), resourceId), queryList); } @NotNull |