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

API: Null check for auto-unboxed field id in builder #12165

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

danielcweeks
Copy link
Contributor

The NestedField builder relies on the NestedField constructor to validate values, but the builder uses Integer for the id value whereas the constructor uses int.

This results in a confusing auto-unboxing related NPE if a field id is not provided to the builder. This PR adds a check prior to the auto-unboxing to provide a reasonable message that the field id is required.

@Fokko Fokko merged commit 3bd04be into apache:main Feb 6, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants