Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-7948

[LP - RHV product] (7.0.z) Regex with parenthesis doesn't work with resource locator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.6.CR1, 7.0.6.GA
    • 7.0.3.GA
    • REST
    • None
    • EAP 7.0.6

      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 AS 7 and Resteasy 2.3.2.

              spyrkob Bartosz Spyrko-Smietanko
              vtunka Václav Tunka
              Peter Mackay Peter Mackay
              Peter Mackay Peter Mackay
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: