Disable NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE 15/99915/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 1 Mar 2022 07:34:06 +0000 (08:34 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 1 Mar 2022 07:40:49 +0000 (08:40 +0100)
This check is getting more aggressive as more and more things are
annotated. At the end of the day, even fully @NonNull-annotated return
values trigger this for unknown reasons.

Change-Id: Iac45b8848dbc07cb64b04549fab8f01b14119695
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
spotbugs/src/main/resources/spotbugs-exclude.xml

index e6a2b99f444fc15db4ec78a247076156fcf0ed96..836893c1c4d25b6e1f144ac13fb8db63e3f20750 100644 (file)
       <Bug pattern="NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE" />
       <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
 
+      <!--
+           Triggers a lot of false-positives:
+           https://github.com/spotbugs/spotbugs/issues?q=is%3Aissue+is%3Aopen+NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
+           It is getting worse with Guava annotations and failure to account for TYPE_USE @NonNull annotations, as
+           noted in https://github.com/spotbugs/spotbugs/issues/470 -->
+      <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
+
       <!-- https://github.com/spotbugs/spotbugs/issues/511. Strict reading of Object.equals() contract means that
            evenever equals() behaviour is defined, all implementations need to adhere to it. The only reason
            to override the method (assuming correct API design, of course) is to provide a more efficient