[java] SwitchStmtsShouldHaveDefault triggered when default case is present #3605
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version:
6.40.0
Rule:
PMD.SwitchStmtsShouldHaveDefault
https://pmd.github.io/pmd-6.40.0/pmd_rules_java_bestpractices.html#switchstmtsshouldhavedefault
Description:
Code Sample demonstrating the issue:
Expected outcome:
No violation
** Actual outcome:**
PMD reports a violation at line
switch(state)
, but that's wrong. That's a false positive.Running PMD through: Gradle
The text was updated successfully, but these errors were encountered: