Disable NPE NULL check 31/78331/3
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 1 Dec 2018 21:41:37 +0000 (22:41 +0100)
committerMichael Vorburger <vorburger@redhat.com>
Tue, 4 Dec 2018 17:16:54 +0000 (17:16 +0000)
As noted https://github.com/spotbugs/spotbugs/issues/756,
this check is triggered by Java 11's desugraing of try-with-resources.

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

index d1bddfbb9cf8d2540982e21e8a57453fb2c0b89e..0e1ae8c4b7316e2b8e330e19f4a4997f2a99dd0c 100644 (file)
@@ -26,6 +26,9 @@
            to override the method (assuming correct API design, of course) is to provide a more efficient
            implementation. This rule would be forcing a @SuppressFBWarnings on perfectly compliant classes. -->
       <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
+
+      <!-- https://github.com/spotbugs/spotbugs/issues/756. spotbugs does not grok Java 11's try-with-resources -->
+      <Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
     </Or>
   </Match>
 </FindBugsFilter>