Unitils

Mock injection does not work with generic types sample Mock<GenericDao<T, PK>> mockDao;

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 3.1
  • Component/s: mock
  • Description:
    Mock injection does not work with generic types sample Mock<GenericDao<T, PK>> mockDao;

Activity

Hide
Tim Ducheyne added a comment - 11/Nov/09 6:10 PM
There indeed was a problem with generic type handling (especially with types with more than 1 generic type class<A, B>)
The generics implementation in Java is very difficult to work with. A lot of information is not accessible because of the type erasure for example.

I've had to rework the type handling. Instead of Class I know use Type.

Thanks for the report,
Tim
Show
Tim Ducheyne added a comment - 11/Nov/09 6:10 PM There indeed was a problem with generic type handling (especially with types with more than 1 generic type class<A, B>) The generics implementation in Java is very difficult to work with. A lot of information is not accessible because of the type erasure for example. I've had to rework the type handling. Instead of Class I know use Type. Thanks for the report, Tim

People

Dates

  • Created:
    06/Nov/09 10:13 AM
    Updated:
    11/Nov/09 6:10 PM
    Resolved:
    11/Nov/09 6:10 PM