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

Annotations inherited from interface not merged with annotations from implementing method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.2, 3.1
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: