-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
(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.