-
Notifications
You must be signed in to change notification settings - Fork 41
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
Improve auto type (List or Object) for CSV to JSON conversion #11
Comments
It also seems to me that |
You're right. To fix this issue, I've recently created a new annotation called |
Will be available from @tuanchauict Thank you so much for this solution 😄 |
In
RetrosheetInterceptor.isReturnTypeList()
, I see we are usingcontains("java.util.List")
to check whether the return type is in list type or not. This limits auto type to just List but not the other collection type like Set, Array.Besides, suspend function does not return a list but a
kotlin.coroutines.Continuation
param is appended at the last of the parameter list. It seems to me that the code cannot check suspend function.Using
contains
also dangerous because if a generic type (not collection) acceptsList
as the type param,contains
will cause incorrect. For example:One more problem (although we don't expect to use retrosheet for a real product), obfuscation may rename List to anything..
I suggest a new check like this:
The text was updated successfully, but these errors were encountered: