Skip to content
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

Add BasicPolymorphicTypeValidator.Builder.allowIfSubTypeIsArray() #2534

Closed
cowtowncoder opened this issue Nov 7, 2019 · 0 comments
Closed

Comments

@cowtowncoder
Copy link
Member

(follow up to #2532)

Since Java array types are real non-generic types, distinct from type of elements contained, there is a use case where one might want to accept all Array-valued subtypes, regardless of elements contained. This does not actually allow all possible element values within since polymorphic type handling should be applied separately to values themselves (and as far as I can tell, is the case for all standard DefaultTyping cases, and annotation-based approach as well).

To support this, let's add allowIfSubTypeIsArray() in Builder of BasicPolymorphicTypeValidator: it will still need to be explicitly enabled (to avoid any possibility of otherwise leaking gadget types in case developer has managed to implement custom inclusion criteria), but is simple addition for cases where Array values are stored as polymorphic values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant