summaryrefslogtreecommitdiffstats
path: root/cps-ri/src
diff options
context:
space:
mode:
authorDylanB95EST <dylan.byrne@est.tech>2021-05-21 11:55:41 +0100
committerDylan Byrne <dylan.byrne@est.tech>2021-05-21 13:03:35 +0000
commit150d3edb6f1d3609f62caf2bd7a997485049dc23 (patch)
tree08e47fbb4a3c2e62dae5545ab95a29769387e41a /cps-ri/src
parentbd7d525eb93302682bf61269f098c5270e97e780 (diff)
Adding Possessive Quantifier to Regex to prevent backtracking
Issie-ID: CPS-89 Commit-ID: 22dbd115593cd429b1b75af2000310ce79cfbf10 Signed-off-by: DylanB95EST <dylan.byrne@est.tech> Change-Id: I12f8aec77e9a4faa62234b7108617d47e4ed63fd
Diffstat (limited to 'cps-ri/src')
-rw-r--r--cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java b/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java
index b27301baec..c8886689ec 100644
--- a/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/query/CpsPathQuery.java
@@ -65,9 +65,9 @@ public class CpsPathQuery {
private static final String INDIVIDUAL_LEAF_DETAIL_PATTERN = ("\\s{1,9}and\\s{1,9}");
- private static final Pattern LEAF_VALUE_PATTERN = Pattern.compile("@(\\S+?)=(.*)");
+ private static final Pattern LEAF_VALUE_PATTERN = Pattern.compile("@(\\S+?)=(.*+)");
- private static final Pattern ANCESTOR_AXIS_PATTERN = Pattern.compile("(\\S+)\\/ancestor::\\/?(\\S+)");
+ private static final Pattern ANCESTOR_AXIS_PATTERN = Pattern.compile("(\\S+)\\/ancestor::\\/?(\\S++)");
/**
* Returns a cps path query.