问题描述
我找不到报告冗余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检查的类是 FindNullDeref .但是,它也会执行许多其他检查,因此您也将其关闭.不知道是否有可能仅关闭困扰您的那张支票.
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"在行家中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!