Skip to content

Commit

Permalink
chore: add suppression for spotbugs nullable warn
Browse files Browse the repository at this point in the history
Ref: spotbugs/spotbugs 616
  • Loading branch information
dnwe committed Mar 23, 2023
1 parent f1292b5 commit 16bbbbd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
public abstract class NullSafeFunction<F, T> implements Function<F, T> {

@Override
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
value = "NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE",
justification = "https://github.com/spotbugs/spotbugs/issues/616"
)
public T apply(F input) {
return applyNullSafe(checkNotNull(input, "This function does not allow using null as argument"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
public abstract class NullSafePredicate<T> implements Predicate<T> {

@Override
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
value = "NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE",
justification = "https://github.com/spotbugs/spotbugs/issues/616"
)
public boolean apply(T input) {
return applyNullSafe(checkNotNull(input, "Argument for this predicate can't be null"));
}
Expand Down

0 comments on commit 16bbbbd

Please sign in to comment.