Inspectopedia
 
2024.3

Enum 'switch' statement that misses case

Info
New
Last modified: 03 December 2024

Reports switch statements over enumerated types that are not exhaustive.

Example:

After the quick-fix is applied:

Use the Ignore switch statements with a default branch option to ignore switch statements that have a default branch.

This inspection depends on the Java feature 'Enums', which is available since Java 5.