[ 
https://issues.apache.org/jira/browse/AVRO-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497375#comment-17497375
 ] 

Ismaël Mejía edited comment on AVRO-1831 at 2/24/22, 12:56 PM:
---------------------------------------------------------------

findbugs is kind of a complicated project because only the API 'jsr305' is 
licensed with a compatible license but the rest isn't.

So yes at least in theory we can use the jsr305 dependency if we take care of 
allowing it properly, and add the spotbugs plugin analysis for Avro that is 
more recent and mantained to do the analysis (and it is only a build 
dependency).

What I am a bit worried is of making the generated code depend on it. Can we 
ensure that the generated code works if we make the *jsr305* dependency 
*optional* (in the Maven sense)?

I can't remember exactly what was the issue at the time with jsr305 but I 
remember we had to exclude it from many dependencies (currently in master for 
example) because it triggered some errors/warnings probably on the rat plugin 
or some security one, but I am not sure now. Maybe worth to double check too.


was (Author: iemejia):
findbugs is kind of a complicated project because only the API 'jsr305' is 
licensed with a compatible license but the rest isn't.

So yes at least in theory we can use the jsr305 dependency if we take care of 
allowing it properly, and add the spotbugs plugin analysis for Avro that is 
more recent and mantained to do the analysis (and it is only a build 
dependency).

What I am a bit worried is of making the generated code depend on it. Can we 
ensure that the generated code works if we make this dependency optional (in 
the Maven sense)?

I can't remember exactly what was the issue at the time with jsr305 but I 
remember we had to exclude it from many dependencies (currently in master for 
example) because it triggered some errors/warnings probably on the rat plugin 
or some security one, but I am not sure now. Maybe worth to double check too.

> Take advantage of JSR 3.5 annotations in the generated java classes.
> --------------------------------------------------------------------
>
>                 Key: AVRO-1831
>                 URL: https://issues.apache.org/jira/browse/AVRO-1831
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Zoltan Farkas
>            Priority: Minor
>
> it would be nice if the generated records would take advantage of:
> @javax.annotation.Nullable
> @javax.annotation.Nonnull
> to annotate the fields that can be null...
> This would have a documenting role, and more importantly allow findbugs to 
> detect incorrect use of the fields.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to