All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.pmd.rules.pmd.DefaultLabelNotLastInSwitchStmt.html Maven / Gradle / Ivy

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