summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsourabh_sourabh <sourabh.sourabh@est.tech>2021-12-20 15:40:55 +0530
committerToine Siebelink <toine.siebelink@est.tech>2021-12-21 16:49:54 +0000
commit52303c25db6305bff05751d1ff3c83d452afbf05 (patch)
treeb2bbf3acb40abc185c2d8efd6cb79f5841da7782
parent983510777aead2f8827c5f74fa54193884ef79aa (diff)
Fix Sonar Qube Violations - Recurring task
Issue-ID: CPS-475 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I4279d5ca24b6cd78f419288eba10f557965c5e7b
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java2
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/service/YangResourceExtractor.java4
2 files changed, 5 insertions, 1 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 27a292de..4f126227 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
@@ -186,7 +186,7 @@ public class DmiServiceImpl implements DmiService {
}
private String createModuleRequest(final ModuleReference moduleReference) {
- final Map ietfNetconfModuleReferences = new LinkedHashMap<String, String>();
+ final Map<String, String> ietfNetconfModuleReferences = new LinkedHashMap<>();
ietfNetconfModuleReferences.put("ietf-netconf-monitoring:identifier", moduleReference.getName());
ietfNetconfModuleReferences.put("ietf-netconf-monitoring:version", moduleReference.getRevision());
final ObjectWriter objectWriter = objectMapper.writer().withRootName("ietf-netconf-monitoring:input");
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/YangResourceExtractor.java b/src/main/java/org/onap/cps/ncmp/dmi/service/YangResourceExtractor.java
index d6ff3d2b..d41240b9 100644
--- a/src/main/java/org/onap/cps/ncmp/dmi/service/YangResourceExtractor.java
+++ b/src/main/java/org/onap/cps/ncmp/dmi/service/YangResourceExtractor.java
@@ -22,6 +22,8 @@ package org.onap.cps.ncmp.dmi.service;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.onap.cps.ncmp.dmi.exception.ModuleResourceNotFoundException;
import org.onap.cps.ncmp.dmi.model.YangResource;
@@ -29,7 +31,9 @@ import org.onap.cps.ncmp.dmi.service.model.ModuleReference;
import org.springframework.http.ResponseEntity;
@Slf4j
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class YangResourceExtractor {
+
static YangResource toYangResource(final ModuleReference moduleReference,
final ResponseEntity<String> responseEntity) {
final YangResource yangResource = new YangResource();