Rule Definition
The keyword default is executed when none of the conditions being tested for in the switch statement are met or executed. Having no default, means that there is no backup. The cases that are "impossible" today are the ones most likely to be the causes of untraceable bugs in the future, when the impossible changes to the standard.
Remediation
Add the default statement with appropriate handling of unexpected values.
Related Technologies
Technical Criterion
Programming Practices - Error and Exception Handling
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.