
org.sonar.l10n.pmd.rules.pmd.DefaultLabelNotLastInSwitchStmt.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-pmd-plugin Show documentation
Show all versions of sonar-pmd-plugin Show documentation
Sonar-PMD is a plugin that provides coding rules from PMD.
The newest version!
Switch statements should have a default label. Example :
public class Foo {
void bar(int a) {
switch (a) {
case 1: // do something
break;
default: // the default case should be last, by convention
break;
case 2:
break;
}
}
}
This rule is deprecated, use {rule:java:SwitchLastCaseIsDefaultCheck} instead.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy