You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by "opwvhk (via GitHub)" <gi...@apache.org> on 2023/06/01 10:55:37 UTC

[GitHub] [avro] opwvhk commented on a diff in pull request #2142: AVRO-3641: Adds support for nullSafeAnnotations to java SpecificCompiler

opwvhk commented on code in PR #2142:
URL: https://github.com/apache/avro/pull/2142#discussion_r1212971467


##########
lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm:
##########
@@ -28,6 +28,9 @@ import org.apache.avro.message.BinaryMessageDecoder;
 import org.apache.avro.message.SchemaStore;
 #end
 #if (${this.gettersReturnOptional} || ${this.createOptionalGetters})import java.util.Optional;#end
+#if (${this.createNullSafeAnnotations})import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
+#end

Review Comment:
   Instead of an import, can we please use the same pattern as for other types?
   
   Instead of `String`, the code used `java.lang.String` as well, because this makes name clashes less likely.
   
   Additionally, using explicit annotation classes allows us to make the annotations configurable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org