-
Notifications
You must be signed in to change notification settings - Fork 168
Add support for parameterized and generic types in DataConverter (#2413) #2605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks, I think this makes sense. Can we add a test to verify the reported issue is now resolved? I think we just need to have a workflow with the following signature |
* @return the raw Class for the type | ||
*/ | ||
static Class<?> getRawClass(Type type) { | ||
if (type instanceof Class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to handle any other type
? I might just need to test but isn't GenericArrayType
possible as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch regarding GenericArrayType
- I've added support for that as well now.
@Quinn-With-Two-Ns added specific test you mentioned to |
* @param type the Type to extract from (could be Class, ParameterizedType, or GenericArrayType) | ||
* @return the raw Class for the type | ||
*/ | ||
static Class<?> getRawClass(Type type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also don't shouldn't expose this on the data converter interface, this is an implementation detail and should not be part of the public API
Found a better way to handle these edge cases |
Proposal to resolve #2413