Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1569

Regex with parenthesis doesn't work with resource locator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.22.Final, 3.1.2.Final
    • 3.0.19.Final
    • jaxrs
    • None

      When a @Path annotation that contains regex with parenthesis is applied to a resource locator it doesn't work correctly. For example, the following works correctly:

      @GET
      @Path("{name: (works|WORKS)}")
      public Response works(@PathParam("name") String name) {
          SubResource sub = new SubResource(name);
          return sub.get();
      }
      

      But the following does not, it returns a 404 error response:

      @Path("{name: (fails|FAILS)}")
      public SubResource fails(@PathParam("name") String name) {
          return new SubResource(name);
      }
      

      I am attaching a simple application that reproduces this.

      The same application used to work correctly with JBoss 7 and Resteasy 2.3.2.

        1. api.tgz
          1.0 kB
        2. api.war
          4 kB
        3. Test1569.java
          4 kB
        4. xPatch.txt
          1 kB

            rsearls r searls
            juan.hernandez_jira Juan Hernández (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: