Uploaded image for project: 'Hibernate Validator'
  1. HV-1461

ExecutableHelper#overrides does not work correctly with the method containing generic and non generic parameters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4.1.Final
    • Fix Version/s: 6.0.8.Final
    • Component/s: engine
    • Labels:
      None

      Description

      public class Entity {
      }
      
      public class Room extends Entity {
      }
      
      public interface IUpdateService<T extends Entity> {
      	void update(T entity);
      	void update(Long id, T entity);
      }
      
      public interface IRoomUpdateService extends IUpdateService<Room> {
      	void update(Room entity);
      	void update(Long id, Room entity);
      }
      

      ExecutableHelper.overrides(IRoomUpdateService.class.getMethod("update", Room.class), IUpdateService.class.getMethod("update", Entity.class)) is true, but
      ExecutableHelper.overrides(IRoomUpdateService.class.getMethod("update", Long.class, Room.class), IUpdateService.class.getMethod("update", Long.class, Entity.class)) is false.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: