CheckForNull instead.CheckReturnValue instead.ParametersAreNonnullByDefault instead
of @DefaultAnnotation(NonNull.class) so that method parameters are nonnull by default in the annotated
element. You can also use TypeQualifierDefault
in general to define your own annotation that specifies a default type qualifier. For example,
Nonnegative
TypeQualifierDefault(ElementType.PARAMETER)
public @interface ParametersAreNonnegativeByDefault {}
The JSR305 CheckReturnValue
annotation can be applied to a type or package, and it will act as a default for all methods
in that class or package unless otherwise overridden.
ParametersAreNonnullByDefault instead
of @DefaultAnnotation(NonNull.class), and TypeQualifierDefault
in general to define a type qualifier default. The JSR305 CheckReturnValue
annotation can be applied to a type or package, and it will act as a default for all methods
in that class or package unless otherwise overridden.SuppressFBWarnings).Nonnull instead.Nullable instead.OverridingMethodsMustInvokeSuper insteadConfidence insteadSuppressFBWarnings insteadCopyright © 2015. All rights reserved.