AVRO-4119: [java] Make Nullable and NotNull annotations configurable#3312
Merged
opwvhk merged 2 commits intoapache:mainfrom May 3, 2025
Merged
AVRO-4119: [java] Make Nullable and NotNull annotations configurable#3312opwvhk merged 2 commits intoapache:mainfrom
opwvhk merged 2 commits intoapache:mainfrom
Conversation
Add nullSafeAnnotationNullable and nullSafeAnnotationNotNull configuration options to allow specifying the exact annotations to use when createNullSafeAnnotations is enabled. This allows using annotations besides the JetBrains annotations (which remain the default for backward-compatibility).
opwvhk
reviewed
Feb 21, 2025
lang/java/tools/src/test/compiler/input/nullsafeannotationsfieldstest.avsc
Show resolved
Hide resolved
opwvhk
requested changes
Feb 21, 2025
Contributor
opwvhk
left a comment
There was a problem hiding this comment.
LGTM, but there's one file that should also be removed (see previous comment).
Contributor
Author
|
Is the failing interop test relevant? Tbh I'm not sure I understand what the problem with it is. |
opwvhk
approved these changes
Feb 22, 2025
Contributor
Looks like a classpath issue: it seems to use an old version of the compiler (without your change). |
Contributor
Author
|
Hey, so, is there still something left for me to do to get this merged? |
Contributor
|
Some recent changes to main fixed the failing check, and there have been no conflicting changes. I propose to merge this near the end of the week unless someone objects. |
opwvhk
added a commit
that referenced
this pull request
Jun 13, 2025
…3312) Add nullSafeAnnotationNullable and nullSafeAnnotationNotNull configuration options to allow specifying the exact annotations to use when createNullSafeAnnotations is enabled. This allows using annotations besides the JetBrains annotations (which remain the default for backward-compatibility). Co-authored-by: Oscar Westra van Holthe - Kind <opwvhk@apache.org> (cherry picked from commit 067c440)
opwvhk
added a commit
to opwvhk/avro
that referenced
this pull request
Sep 5, 2025
…pache#3312) Add nullSafeAnnotationNullable and nullSafeAnnotationNotNull configuration options to allow specifying the exact annotations to use when createNullSafeAnnotations is enabled. This allows using annotations besides the JetBrains annotations (which remain the default for backward-compatibility). Co-authored-by: Oscar Westra van Holthe - Kind <opwvhk@apache.org>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This pull request adds the nullSafeAnnotationNullable and nullSafeAnnotationNotNull configuration options to the Java code generator, making it possible to specify the exact annotations to use when createNullSafeAnnotations is enabled.
This allows using nullability annotations besides the JetBrains annotations (which remain the default for backward compatibility), fixing AVRO-4119.
Verifying this change
This change added tests and can be verified as follows:
Documentation