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

Regular expression parameter with non-capturing group doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.4, 3.3.11
    • 3.5.0, 3.3.12, 3.4.5
    • JAX-RS
    • None
    • Unknown

    Description

      After https://issues.apache.org/jira/browse/CXF-8278 is resolved, the non-capturing group regular expression for path parameter doesn't work.
      The following test case is a reproducer for this issue:

        @Test
          public void testNonCapturingGroup() {
              URITemplate t1 = new URITemplate("/{name: (?:cxf|CXF)}");
              MultivaluedMap<String, String> values = new MetadataMap<>();
              assertTrue("should match '/cxf' url", t1.match("/cxf", values));
              Assert.assertEquals("cxf", values.get("name").get(0));
          }
      

      Attachments

        Issue Links

          Activity

            People

              ema Jim Ma
              ema Jim Ma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: