aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src
diff options
context:
space:
mode:
authorleventecsanyi <levente.csanyi@est.tech>2022-12-08 14:49:29 +0100
committerleventecsanyi <levente.csanyi@est.tech>2022-12-12 11:13:22 +0100
commita4f4215c435414360f281b625705595be9367ace (patch)
tree8c1a196844e4149b5809580f747e0f4ca5cddf56 /cps-ncmp-service/src
parentaa29f24b0da9b9d2c86a0c528357a17ff3d7a871 (diff)
Fixing SonarQube violations
- Code smell fixes Signed-off-by: leventecsanyi <levente.csanyi@est.tech> Issue-ID: CPS-475 Change-Id: I4b47ece82aed7e4b31aaa28e601e419fb6f06718
Diffstat (limited to 'cps-ncmp-service/src')
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueriesImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueriesImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueriesImpl.java
index 1a54a824b2..bda0a728b4 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueriesImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/CmHandleQueriesImpl.java
@@ -47,6 +47,7 @@ public class CmHandleQueriesImpl implements CmHandleQueries {
private static final String NCMP_DATASPACE_NAME = "NCMP-Admin";
private static final String NCMP_DMI_REGISTRY_ANCHOR = "ncmp-dmi-registry";
+ private static final String DESCENDANT_PATH = "//";
private final CpsDataPersistenceService cpsDataPersistenceService;
private static final Map<String, NcmpServiceCmHandle> NO_QUERY_TO_EXECUTE = null;
@@ -72,7 +73,7 @@ public class CmHandleQueriesImpl implements CmHandleQueries {
}
Map<String, NcmpServiceCmHandle> cmHandleIdToNcmpServiceCmHandles = null;
for (final Map.Entry<String, String> publicPropertyQueryPair : propertyQueryPairs.entrySet()) {
- final String cpsPath = "//" + propertyType.getYangContainerName() + "[@name=\""
+ final String cpsPath = DESCENDANT_PATH + propertyType.getYangContainerName() + "[@name=\""
+ publicPropertyQueryPair.getKey()
+ "\" and @value=\"" + publicPropertyQueryPair.getValue() + "\"]";