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

Annotations inherited from interface not merged with annotations from implementing method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0
    • 3.0.2, 3.1
    • JAX-RS
    • None
    • Unknown

    Description

      Annotations inherited from interface not merged with annotations from implementing method

      example interface

      DocumentResource.java
      public interface DocumentResource {
          @GET
          @Produces("application/xml")
          @Path("/document")
          Document getDocument(@QueryParam("objectId") String objectId);
      }
      

      example implementation method

      DocumentResourceImpl.java
      public class DocumentResourceImpl implements DocumentResource {
          @XSLTTransform(value="stylesheets/document.xsl", type = XSLTTransform.TransformType.CLIENT)
          @Override
          public Document getDocument(String objectId) {
          }
      }
      

      when i place breakpoint in XSLTJaxbProvider.java in method isWriteable
      i see only three annotations in anns variable: @GET, @Produces, @PATH, and don't see @XSLTTransform.

      Is this expected behavior?

      Doc only states "Similarly, annotations can be inherited from super-classes. In CXF, the resource class will inherit the class-level annotations from both its implemented interfaces and any class it extends."

      and don't mention annotations from implementing method

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            slavb18 Vjacheslav Borisov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: