Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8278

@Path with regular expression containing parentheses does not resolve correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.6
    • Fix Version/s: 3.3.6, 3.4.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Currently the constructor for org.apache.cxf.jaxrs.model.URITemplate adds parentheses around the regex pattern.  However, if a user specifies a regex already containing parentheses then the URITemplate constructor will add additional parenthesis around the regex pattern.   This will result in the  Regex expression as being a group within another group and will cause the Matcher returned from Pattern.matcher() to contain duplicate values for this regex pattern.  As a result, the number of values will not match the number of variables. 

      The URITemplate constructor should be changed to only add parentheses if they do not already exist.

      I know this issue exists in version 3.3.6, but I suspect it may have existed in all previous versions as well.

       

        Attachments

          Activity

            People

            • Assignee:
              coheigea Colm O hEigeartaigh
              Reporter:
              jckofbyron Jim Krueger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: