Fix Sonar Qube Violations - Recurring task
Issue-ID: CPS-475
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I4279d5ca24b6cd78f419288eba10f557965c5e7b
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 27a292d..4f12622 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 @@
}
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 d6ff3d2..d41240b 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 @@
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.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();