Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-11229

JAX-RS validation problem marked as Error instead of Warning - Edge Case

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 3.3.0.Beta3
    • 3.3.0.Beta1
    • webservices
    • None

      Following JBIDE-11070's fix and some extra code in our project, there's an edge-case that wasn't covered by the previous fix.

      Unfortunately, I can't point out to exactly what's causing the issue, but I can possibly guide to it.

      Take the following code sample:

      @Path("/foo/

      {param1}

      /bar")
      public class FooRestService {

      @PUT
      @Path("

      {param2}")
      public Response update(@Context HttpServletRequest requestContext, Bar bar, @PathParam("{param2}

      ") String param2) throws Exception

      { ... }

      }

      This code will generate the following error:
      Description Resource Path Location Type
      Invalid @PathParam value: expected '[param1, param2]' FooRestService.java ‪/path/to/class line XX JAX-RS Problem

      I imagine this is due to the following possible reasons:
      1. There's a

      {param} on the class's @Path annotation (first time we have it).
      2. There's more than one {param}

      that's supposed to be included in the method signature.
      3. A combination of the two above reasons.

            xcoulon@redhat.com Xavier Coulon
            webron_jira Ron Ratovsky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: