diff options
author | niamhcore <niamh.core@est.tech> | 2021-05-04 09:52:19 +0100 |
---|---|---|
committer | niamhcore <niamh.core@est.tech> | 2021-05-04 10:03:27 +0100 |
commit | 10f834104ead71661cff6823a79b9346169b79e1 (patch) | |
tree | 81a82dfe8295001e8b5e2e0ab539716e83be0f8b /cps-ri/src/main | |
parent | 78d64c160e02268afe9bb4770708778b9078c37e (diff) |
Fix ancestor cps path to recognize ancestor list value
Issue-ID: CPS-305
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: I28f7f0c120a39190068a3192dccf0a1a6fbfeaf2
Diffstat (limited to 'cps-ri/src/main')
-rw-r--r-- | cps-ri/src/main/java/org/onap/cps/spi/impl/CpsDataPersistenceServiceImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
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 ab135fd3ae..343a0886b3 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 @@ -175,8 +175,8 @@ public class CpsDataPersistenceServiceImpl implements CpsDataPersistenceService final CpsPathQuery cpsPathQuery) { final Set<String> ancestorXpath = new HashSet<>(); final var pattern = - Pattern.compile("(\\S*\\/" + cpsPathQuery.getAncestorSchemaNodeIdentifier() + REG_EX_FOR_OPTIONAL_LIST_INDEX - + "\\/\\S*"); + Pattern.compile("(\\S*\\/" + Pattern.quote(cpsPathQuery.getAncestorSchemaNodeIdentifier()) + + REG_EX_FOR_OPTIONAL_LIST_INDEX + "\\/\\S*"); for (final FragmentEntity fragmentEntity : fragmentEntities) { final var matcher = pattern.matcher(fragmentEntity.getXpath()); if (matcher.matches()) { |