Affects PMD Version:
7.7.0
Rule:
TooFewBranchesForSwitch.
Description:
Having multiple labels in a single case
should be considered the same as multiple cases. So no TooFewBranchesForSwitch
should be triggered for the code below:
Code Sample demonstrating the issue:
return switch (someEnumValue) { case A, B, C -> 1; default -> 0; };
Expected outcome:
No violation.
Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
Gradle
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