When trying to map a field with nested generic types like List<? extends A> I get a ClassCastException (WildcardTypeImpl cannot be cast to java.lang.Class)
I think this issue can be handled with the 3487264.
The exception is raised from the method determineGenericsType(Type) in the ReflectionUtils class, because of the following casting:
result = (Class<?>) genericType
I've patched a copy of the class by replacing that line by the following code, but I'm not sure if it is the optimal solution or even a correct approach, though it works for my own purposes:
if (genericType instanceof WildcardType){
result = (Class<?>) ((WildcardType) genericType).getUpperBounds()[0];
} else {
result = (Class<?>) genericType;
}