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

Interface with generic type does not work with client proxy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.7.0.Final, 4.1.0.Final
    • 3.0.17.Final, 3.6.2.Final
    • None
    • None

    Description

      public interface IEntityResource<T extends BaseEntity> {
        @GET
        @Produces(MediaType.APPLICATION_JSON)
        public List<T> findAll();
      
      public interface PersonResource extends IEntityResource<Person>{}
      

      If I create a client proxy with the PersonResource, I get class cast errors from BaseEntity. If I add a method:

      public interface PersonResource extends IEntityResource<Person>{
        public List<Person> findAll();
      }
      

      The client works properly.

      Attachments

        Activity

          People

            mmarusic Marek Marusic (Inactive)
            mbaranski_jira Mike Baranski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: