添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I am surprised that the rule RSPEC-2583 does not detect my unreachable statement in Java . Is this a false-negative regarding the rule, or can the rule only detect unreachable code when boolean expressions are used?

Here is an example of the false-negative in my sonar cloud project.

The project shows the following example:

int V1 = 1;
if (V1 > 2) {
    V1 = 3;

Here the statement V1 = 3 cannot be reached, but the rule RSPEC-2583 in SonarCloud does not report this.

Thanks in advance for your help!