Q:

Inheritance conflicts in resteasy

My issue is quite simple, I hava a generic parent class with the following JAXRS definition
@POST
@Restricted(permissions = {"*_create"})
public Response save(T entity) throws Exception {

And I created a specific child class with generic parameter T becoming Access type, which have the following declaration:
@POST
@Restricted(permissions = {"*_create"})
@Consumes({"application/x-www-form-urlencoded", "application/json", "application/xml"})
public Response save(final Access newAccess, @HeaderParam("Authorization") String token, @Context HttpServletRequest request) throws Exception {

My issue is that Resteasy has apparently a random behavior that is set on war launch that it will keep for application lifetime.  Some time it associates the incomming POST request to the parent save method, sometime to the child one.  I aim to get the child one being systematically used, but I want to avoid to change my parent class as lot's of resource defining classes in my project rely on it with no issue (and do not override the save method for instance).  Is there an easy (like in resteasy) way to fiw this issue ? 

A:

As for now the solution I found was to override the parent method signature public Response save(T entity) throws Exception in the child class, without any annotation but the @Override.  The method definition contains a throw new UnsupportedOperationException();. 
@Override
public Response save(Access entity) throws Exception {
    throw new UnsupportedOperationException();
}

This make the other save declaration with jaxrs annotation in this child class to be chosen without ambiguity.