You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose you have a generic type MyType<T> and a concrete type based on that types T to a parameterized type again MyConcreteType extends MyType<Collection<String>>. Using GenericTypeResolver.resolveTypeArguments(MyConcreteType.class, MyType.class) returns Object as resolved type where Collection would be expected.
I dived into the sources and it seems extractClass(Class ownerClass, Type arg) misses a check for Type being an instance of ParameterizedType. In this case it could simply return ((ParameterizedType) type).getRawType(). Currently it simply returns Object.
Oliver Drotbohm opened SPR-7389 and commented
Suppose you have a generic type
MyType<T>
and a concrete type based on that typesT
to a parameterized type againMyConcreteType extends MyType<Collection<String>>
. UsingGenericTypeResolver.resolveTypeArguments(MyConcreteType.class, MyType.class)
returnsObject
as resolved type whereCollection
would be expected.I dived into the sources and it seems
extractClass(Class ownerClass, Type arg)
misses a check forType
being an instance ofParameterizedType
. In this case it could simply return((ParameterizedType) type).getRawType()
. Currently it simply returnsObject
.Affects: 3.0.3
Issue Links:
Referenced from: commits b7b7c06
The text was updated successfully, but these errors were encountered: