Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-636

When resource inherits from generic super-interface, resteasy fails locating jaxrs annotated methods in it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.1
    • None
    • None
    • None
    • Hide

      1. create resource inheriting from generic interface (defined @PUT annotated signature)
      2. impl. this interface
      3. invoke this resource using PUT
      4. result MethodNotAllowedException

      Show
      1. create resource inheriting from generic interface (defined @PUT annotated signature) 2. impl. this interface 3. invoke this resource using PUT 4. result MethodNotAllowedException

      ===========================================================
      @Produces(

      {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_X_YAML})
      public interface UpdatableResource<R extends BaseResource> {

      @GET
      @Formatted
      public R get();

      @PUT
      @Formatted
      @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_X_YAML}

      )
      public R update(R resource);
      }
      ===========================================================
      @Produces(

      {MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_X_YAML}

      )
      public interface DataCenterResource extends UpdatableResource<DataCenter> {

      @Path("storagedomains")
      public AttachedStorageDomainsResource getAttachedStorageDomainsResource();

      @Path("permissions")
      public AssignedPermissionsResource getPermissionsResource();
      }
      ===========================================================
      public class BackendDataCenterResource extends AbstractBackendSubResource<DataCenter, storage_pool>
      implements DataCenterResource {
      ...
      }
      ===========================================================
      update() and get() not found causing MethodNotAllowedException
      ===========================================================
      (AS 7.1.0 CR1 & 2.3 GA)
      ===========================================================

              patriot1burke@gmail.com Bill Burke (Inactive)
              mpastern Michael Pasternak (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: