Skip to content

Support nullable optionals and generic collections#921

Open
snazy wants to merge 1 commit into
projectnessie:mainfrom
snazy:null-opt-gen-coll
Open

Support nullable optionals and generic collections#921
snazy wants to merge 1 commit into
projectnessie:mainfrom
snazy:null-opt-gen-coll

Conversation

@snazy

@snazy snazy commented Jul 17, 2026

Copy link
Copy Markdown
Member

Jackson property type inference only recognized List as a CEL list-like type and treated Optional as an object-like value. Runtime adaptation had the same List-only limitation and returned Optional values as ordinary objects.

Generalize runtime list adaptation to Collection, unwrap Optional values to either their contained CEL value or null, and teach the Jackson 2 and Jackson 3 type descriptors to infer Collection as list and Optional as T. Add regression coverage for Collection, Set, Optional.of, Optional.empty, and nested Optional values.

Jackson property type inference only recognized List as a CEL list-like type and treated Optional as an object-like value. Runtime adaptation had the same List-only limitation and returned Optional values as ordinary objects.

Generalize runtime list adaptation to Collection, unwrap Optional values to either their contained CEL value or null, and teach the Jackson 2 and Jackson 3 type descriptors to infer Collection<T> as list<T> and Optional<T> as T. Add regression coverage for Collection, Set, Optional.of, Optional.empty, and nested Optional values.
@snazy
snazy requested a review from XN137 July 17, 2026 10:14
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

Successfully merging this pull request may close these issues.

1 participant