CRITICAL
Rule Definition
As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when switch statements are nested.
Remediation
Remove nested switch statements.
Violation Code Sample
public function foo( a : Number, b : Number ) : void
{
switch( a )
{
case 1:
break;
case 2:
switch ( b )
{
case 3 :
break;
case 4 :
break;
}
break;
}
}
Reference
http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD
Related Technologies
Technical Criterion
Architecture - Reuse
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.