We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Affects PMD Version: 7.0.0
Rule: category/java/errorprone.xml/ImplicitSwitchFallThrough
Description:
Code Sample demonstrating the issue:
public class Test { boolean foo(String a, String b) { switch (a) { case "a1": return true; case "a2": switch (b) { case "b1": return true; default: return false; } default: // <--- false-positive ImplicitSwitchFallThrough return false; } } }
Outcome:
PMD reports a violation at line 15, but that's wrong. That's a false positive.
the outer case "a2" cannot fall through, since the inner switch is exhaustive and returns from all branches.
case "a2"
Running PMD through: CLI | Maven
The text was updated successfully, but these errors were encountered:
7b55330
[doc] Update release notes (#4963, #4948)
6f0de09
[java] Fix #4948 - ImplicitSwitchFallthrough false positive with nest…
202943e
…ed switch statement (#4963) Merge pull request #4963 from oowekyala:issue4948-switch-fallthrough
oowekyala
Successfully merging a pull request may close this issue.
Affects PMD Version: 7.0.0
Rule: category/java/errorprone.xml/ImplicitSwitchFallThrough
Description:
Code Sample demonstrating the issue:
Outcome:
PMD reports a violation at line 15, but that's wrong. That's a false positive.
the outer
case "a2"
cannot fall through, since the inner switch is exhaustive and returns from all branches.Running PMD through: CLI | Maven
The text was updated successfully, but these errors were encountered: