CRITICAL
Rule Definition
Switch statements should have a default label in order to detect corner cases.
Remediation
Add default case to every switch statement.
Violation Code Sample
public class Foo
{
public funciton bar() : void
{
var x : int = 2;
switch (x)
{
case 2: var j : int = 8;
}
}
}
Reference
http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD
Related Technologies
Technical Criterion
CWE-1075 - Unconditional Control Flow Transfer outside of Switch Block
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.