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

SuperClass and Interface's Annotations are ignored when the Method contains ParameterAnnotation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 3.1.6
    • 3.0.10, 3.1.8, 3.2.0
    • JAX-RS
    • None
    • Mac java 8

    • Unknown

    Description

      Suppose we have below interface and its implementation:
      public interface HelloWorld {
      @GET
      @Path("/hello")
      String sayHello(@QueryParam("name") String name);

      @GET
      @Path("/hello3")
      String sayHello3();
      }

      @Path("/")
      public class HelloWorldImpl implements HelloWorld {

      @Override
      public String sayHello(@QueryParam("name") String name)

      { return "hello " + name; }

      @GET
      @Path("/hello2")
      public String sayHello2(@QueryParam("name") String name)

      { return "hello2 " + name; }

      @Override
      public String sayHello3()

      { return "hello3 "; }

      }

      Get /hello3 works good. but Get /hello?name=neal will result in 404. The expected output is hello neal.

      The root cause is in org.apache.cxf.jaxrs.utils.AnnotationUtils:167 CXF ignores the recurrence search of the method who has parameter annotations.

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            nbqyqx@163.com Neal Hu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: