[ 
https://issues.apache.org/jira/browse/CXF-5844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vjacheslav Borisov updated CXF-5844:
------------------------------------

    Description: 
Annotations inherited  from interface not merged with annotations from  
implementing method

example interface 
{code:title=DocumentResource.java|borderStyle=solid}
public interface DocumentResource {
    @GET
    @Produces("application/xml")
    @Path("/document")
    Document getDocument(@QueryParam("objectId") String objectId);
}
{code}

example implementation method
{code:title=DocumentResourceImpl.java|borderStyle=solid}
public class DocumentResourceImpl implements DocumentResource {
    @XSLTTransform(value="stylesheets/document.xsl", type = 
XSLTTransform.TransformType.CLIENT)
    @Override
    public Document getDocument(String objectId) {
    }
}
{code}

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


  was:
Annotations inherited  from interface not merged with annotations from  
implementing method

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

example implementation method
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



> Annotations inherited  from interface not merged with annotations from  
> implementing method
> -------------------------------------------------------------------------------------------
>
>                 Key: CXF-5844
>                 URL: https://issues.apache.org/jira/browse/CXF-5844
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Vjacheslav Borisov
>            Priority: Minor
>
> Annotations inherited  from interface not merged with annotations from  
> implementing method
> example interface 
> {code:title=DocumentResource.java|borderStyle=solid}
> public interface DocumentResource {
>     @GET
>     @Produces("application/xml")
>     @Path("/document")
>     Document getDocument(@QueryParam("objectId") String objectId);
> }
> {code}
> example implementation method
> {code:title=DocumentResourceImpl.java|borderStyle=solid}
> public class DocumentResourceImpl implements DocumentResource {
>     @XSLTTransform(value="stylesheets/document.xsl", type = 
> XSLTTransform.TransformType.CLIENT)
>     @Override
>     public Document getDocument(String objectId) {
>     }
> }
> {code}
> 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



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to