Pass dynamic serializer for Iterable content filtering by dlwldnjs1009 · Pull Request #5925 · FasterXML/jackson-databind (original) (raw)
…iltering
IterableSerializer.serializeContents() passed _elementSerializer to
_shouldSerializeElement(), but that field is null when element serializers
are resolved dynamically (for example Iterable<Object>).
Sibling serializers such as CollectionSerializer and IteratorSerializer
pass the locally resolved serializer instead. Align IterableSerializer with
that behavior so serializer.isEmpty(ctxt, elem) is consulted for
NON_EMPTY content inclusion.
Add regression test:
JsonIncludeCollectionTest#testIterableNonEmptyWithWildcardElementType.
approved these changes Apr 17, 2026
cowtowncoder changed the title
Follow-up to #5370: pass dynamic serializer for Iterable content filtering Pass dynamic serializer for Iterable content filtering
dlwldnjs1009 deleted the fix/iterable-serializer-filtering-3.1 branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})