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

AVRO-3993: [java] Add better exception msgs when writing invalid enum symnbol #2945

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

j256
Copy link
Contributor

@j256 j256 commented Jun 5, 2024

What is the purpose of the change

This adds more details in the exception when writing and invalid enum symbol as opposed to a NPE.

Verifying this change

Added tests to TestSchema in the enumWriteUnknownField() method that writes an
invalid enum value and tests to make sure it throws and mentions the good and bad symbols.

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@github-actions github-actions bot added the Java Pull Requests for Java binding label Jun 5, 2024
@github-actions github-actions bot added the build label Jun 5, 2024
@github-actions github-actions bot removed the build label Jun 5, 2024
Copy link
Contributor

@opwvhk opwvhk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and simple. Thank you!

@opwvhk opwvhk merged commit 25651dc into apache:main Jun 11, 2024
8 checks passed
@j256 j256 deleted the gw-add-bad-enum-exception branch June 14, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Pull Requests for Java binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants