summaryrefslogtreecommitdiffstats
path: root/cps-ri/src
diff options
context:
space:
mode:
authorDylanB95EST <dylan.byrne@est.tech>2021-05-24 10:04:49 +0100
committerDylanB95EST <dylan.byrne@est.tech>2021-05-24 10:17:57 +0100
commit940d8e4a950d8ce8075a712d9dc3852de828e5b5 (patch)
tree6e9b7147cec5035df48be84318da7c99ca2d5a00 /cps-ri/src
parent150d3edb6f1d3609f62caf2bd7a997485049dc23 (diff)
Adding Atomic Grouping to Discard backtracking once matched as part of Sonar Security Hotspot Fix
Issue-ID: CPS-89 Commit-ID: b23ee774ae2a2305f1feea747931879588f9cada Change-Id: I1f9d54246370b0c0bc8ec3d167eaed27ad58471b Signed-off-by: DylanB95EST <dylan.byrne@est.tech>
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 c8886689ec..401667eaa4 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.