[java] Support @Nullable constructor parameters in ConstructorCoercer - #17770
Conversation
… independent of Optional
PR Summary by QodoJava: Accept JSON null for @nullable constructor parameters in ConstructorCoercer
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
🔗 Related Issues
💥 What does this PR do?
ConstructorCoercer previously only permitted a JSON null for constructor parameters typed Optional; any other parameter threw a JsonException when the value was null, even if the key was present and the field is legitimately nullable by whatever it models.
This adds support for marking a required parameter nullable via jspecify's @nullable type annotation (org.jspecify.annotations.Nullable), independent of whether the key itself is required.
🔧 Implementation Notes
🤖 AI assistance
💡 Additional Considerations
🔄 Types of changes