Skip to content

Commit 069e927

Browse files
committed
chore: add suppression for spotbugs nullable warn
Ref: spotbugs/spotbugs 616
1 parent a772441 commit 069e927

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/org/jenkinsci/plugins/github/util/misc/NullSafeFunction.java

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
public abstract class NullSafeFunction<F, T> implements Function<F, T> {
1515

1616
@Override
17+
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
18+
value = "NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE",
19+
justification = "https://github.com/spotbugs/spotbugs/issues/616"
20+
)
1721
public T apply(F input) {
1822
return applyNullSafe(checkNotNull(input, "This function does not allow using null as argument"));
1923
}

src/main/java/org/jenkinsci/plugins/github/util/misc/NullSafePredicate.java

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
public abstract class NullSafePredicate<T> implements Predicate<T> {
1616

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

0 commit comments

Comments
 (0)