-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Allow for subtype resolution with unknown generics #53
Comments
I think addition of configuration option would be the best option here? In Jackson I think a simple "unknown type" (~= Object.class) is just quietly added in such cases. |
I know this is a bit late, but I've been running into an issue where I have some classes that implement So when I go to look up the classes implementing
By default, Does this issue match what you guys are talking about here? |
@takanuva15 Would it be possible to include type declarations needed for reproduction? Definitely there should never be ArrayIndexOutOfBoundsException and it might be an easy enough fix. |
It was my own custom class implementing Comparator like |
Thank you @takanuva15 ! Maybe I can reproduce it easily with that. |
@takanuva15 Ok, so I can not quite reproduce exception with type like:
but I do see a problem, since this:
returns an empty But I would also like to see the actual failure you see; whether it is due to calling some other method(s) on |
Added a failing case for problem I did find. Still hoping to get another reproduction. |
I've been using
classmate
for type resolutions within my victools/jsonschema-generator library.Unfortunately, I've hit a snag. It's this particular piece of code in the
TypeResolver (lines 288-299)
:Short term: I'm wondering what exactly I can do on my side short of copy-pasting the whole
resolveSubtype()
method and leaving out this unfortunate exception being thrown?Can I somehow provide extra type bindings (even if they are just
Object.class
) to make it work?Mid term: could there be some kind of configuration option on the type resolver to simply set it to (the resolved version of)
Object.class
or some lower bounds of the generic (if that's not already happening) instead of throwing an exception?How did you handle this in Jackson (as per the above in-line comment)?
The text was updated successfully, but these errors were encountered: