-
Notifications
You must be signed in to change notification settings - Fork 1.7k
AVRO-4119: [java] Make Nullable and NotNull annotations configurable #3312
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
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).
lang/java/tools/src/test/compiler/input/nullsafeannotationsfieldstest.avsc
Show resolved
Hide resolved
opwvhk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but there's one file that should also be removed (see previous comment).
|
Is the failing interop test relevant? Tbh I'm not sure I understand what the problem with it is. |
Looks like a classpath issue: it seems to use an old version of the compiler (without your change). |
|
Hey, so, is there still something left for me to do to get this merged? |
|
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. |
…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)
…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>
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