summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java6
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java6
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 94bd97d7..4c8e8ecb 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
@@ -73,7 +73,6 @@ public class DmiServiceImpl implements DmiService {
this.ncmpRestClient = ncmpRestClient;
this.objectMapper = objectMapper;
this.sdncOperations = sdncOperations;
- this.objectMapper = objectMapper;
}
@Override
@@ -84,8 +83,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());
@@ -129,7 +127,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 358da590..d017714f 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
@@ -127,8 +127,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) {
@@ -141,8 +140,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