From d7923e089686848a97b45572772f0093b63789a1 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Tue, 2 May 2023 18:00:53 +0100 Subject: canUseRegexQuickfind does not test for contains-condition This bug causes queries using contains-condition to return wrong results, when INCLUDE_ALL_DESCENDANTS option is set. Issue-ID: CPS-1663 Signed-off-by: danielhanrahan Change-Id: If323e0e3b54d8c9a213dffda46897b2efb01fe2a --- .../main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cps-ri') diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java index 3d9105f680..95270786f9 100644 --- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java +++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java @@ -349,7 +349,8 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService final CpsPathQuery cpsPathQuery) { return fetchDescendantsOption.equals(FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS) && !cpsPathQuery.hasLeafConditions() - && !cpsPathQuery.hasTextFunctionCondition(); + && !cpsPathQuery.hasTextFunctionCondition() + && !cpsPathQuery.hasContainsFunctionCondition(); } private List getDataNodesUsingRegexQuickFind(final FetchDescendantsOption fetchDescendantsOption, -- cgit 1.2.3-korg