如何关闭findbugs“冗余nullcheck"在行家中? [英] How do I turn off findbugs "Redundant nullcheck" in maven?

查看:194
本文介绍了如何关闭findbugs“冗余nullcheck"在行家中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到报告冗余nullcheck"的检测器的名称(RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE),谁知道它是谁?谷歌搜索只是给了我大量的项目报告...

I can't find the name of the detector that reports the "Redundant nullcheck" (RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE) anyone who knows which it is? Googling just gives me tons of project reports...

由于我使用JetBrains @NotNull批注工具(它在字节码中插入了空检查),因此出现很多错误.

I get a lot of errors on it since I use JetBrains @NotNull annotations tool (it inserts null checks into the bytecode).

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>findbugs-maven-plugin</artifactId>
  <version>2.5.2</version>
  <configuration>
    <omitVisitors>???WhatIsTheDetectorsName???</omitVisitors>
  </configuration>
</plugin>

预先感谢

推荐答案

来自findbugs-maven-plugin用法文档指出,visitors/omitVisitors选项都指定了以逗号分隔的应该运行/不运行的错误检测器列表.错误检测器由其类名指定,没有任何包限定.

From the findbugs-maven-plugin usage documentation states that the visitors/omitVisitors options both specify a comma-separated list of bug detectors which should be run/not run. The bug detectors are specified by their class names, without any package qualification.

据我所知,检查非null值的冗余null检查的类是

The class which checks for the redundant null check of non-null value is, as far as I can tell, FindNullDeref. However it does a number of other checks as well, so you would also be turning them off. Not sure if it is possible to turn off just that one check that is bothering you.

这篇关于如何关闭findbugs“冗余nullcheck"在行家中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆