You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2021/09/09 09:46:17 UTC

[GitHub] [cxf] jimma commented on a change in pull request #847: [CXF-8594]:Fix regular expression parameter with non-capturing group …

jimma commented on a change in pull request #847:
URL: https://github.com/apache/cxf/pull/847#discussion_r705168948



##########
File path: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java
##########
@@ -83,7 +83,7 @@ public URITemplate(String theTemplate) {
                     // however do not add them if they already exist since that will cause the Matcher
                     // to create extraneous values.  Parens identify a group so multiple parens would
                     // indicate multiple groups.
-                    if (pattern.startsWith("(") && pattern.endsWith(")")) {
+                    if (pattern.startsWith("(") && pattern.endsWith(")") && !pattern.startsWith("(?:")) {

Review comment:
       @reta  You are right ! I don't know there is another non-capture group like (?>X) and so many lookahead/lookbehind expressions.  Regex is powerful!  I already improved the fix as you suggested. Please review it again. Thanks ! 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org