来自 Apache Commons Lang3 的带有验证 class 的 SonarQube

SonarQube with Validate class from Apache Commons Lang3

我在我的项目中使用包 org.apache.commons.lang3 中的 Validate class 对变量 ( https://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/Validate.html ) 进行非空验证。

我也使用 SonarQube 进行静态代码分析,它总是抱怨,当我之后使用这些变量时,因为它们 可能在那里 .

有没有办法将某些方法标记为声纳的空检查?我真的很想避免将所有事件标记为误报(这实际上不是一个选项,因为在我有机会这样做之前,分析已集成到我的构建中)。

提前致谢!

见原文post下的评论。抱歉打扰了...

Ok, sorry for asking. I'm just stupid. I had two very similar variable names and checked the wrong one... Shouldn't work longer then 8 hours :P Sorry for bothering you!