A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/4250 below:

[java] WhileLoopWithLiteralBoolean - false negative with complex expressions still occurs in PMD 6.52.0 · Issue #4250 · pmd/pmd · GitHub

Affects PMD Version: 6.48.0

Rule: WhileLoopWithLiteralBoolean

Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_bestpractices.html#whileloopwithliteralboolean

Description:
This is an old issue from #3455
When I use pmd 6.48.0 and 6.52.0, I still met this False Negative.

Code Sample demonstrating the issue:

public void func() {
    do {
      // Loop Body
    } while(false || false); // This is a false negative
//        } while(false | false); // This is a similar false negative.
}

Expected outcome:

PMD should report a violation at line 4 and 5, but doesn't. This is a false-negative.

Running PMD through: [CLI]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4