Looking at the list of annotations in FindBugs 2.0, I see that a lot of them have been deprecated.
Some of these (@CheckForNull
, @NonNull
, etc.) have been deprecated because they have equivalent JSR-305 annotations. Good to finally settle the dilemma about which set of annotations to use.
But some FindBugs-specific annotations, such as @DefaultAnnotation
and @DefaultAnnotationForFields
, have also been deprecated and I cannot find any explanation of what to use in their place. I'm trying to migrate a codebase that makes heavy use of these annotations, and I'm a bit stuck.
I see that JSR-305 has @ParametersAreNonnullByDefault
, which I could use to replace some instances of @DefaultAnnotationForParameters
, but that will not cover all cases.
Am I missing something big here? Should I be using some kind of settings file or something, instead of annotations?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…