From 46de0fbcdd71324353cf9adf824060a57bc5d642 Mon Sep 17 00:00:00 2001 From: JosephKeenan Date: Mon, 18 Oct 2021 12:58:01 +0100 Subject: CPS-475 - fix sonar smells Issue-ID: CPS-475 Change-Id: Ifbf14eaa93a8befa262a24499ab72b6c4cc2441c Signed-off-by: JosephKeenan --- .../org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cps-ncmp-service/src') diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java index d6aaf36d3a..11d1a89652 100755 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java @@ -388,11 +388,11 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService prepareModuleSubsets(moduleReferencesFromCmHandle, existingModuleReferences, unknownModuleReferences); final Map newYangResourcesModuleNameToContentMap; - if (unknownModuleReferences.size() > 0) { - newYangResourcesModuleNameToContentMap = getNewYangResourcesFromDmi(persistenceCmHandle, - unknownModuleReferences, cmHandlePropertiesAsMap); - } else { + if (unknownModuleReferences.isEmpty()) { newYangResourcesModuleNameToContentMap = new HashMap<>(); + } else { + newYangResourcesModuleNameToContentMap = getNewYangResourcesFromDmi(persistenceCmHandle, + unknownModuleReferences, cmHandlePropertiesAsMap); } cpsModuleService.createSchemaSetFromModules(NF_PROXY_DATASPACE_NAME, persistenceCmHandle.getId(), newYangResourcesModuleNameToContentMap, existingModuleReferences); -- cgit 1.2.3-korg