Code Inspection: Using CASE instead of conditional function and vice versa
Reports situations when CASE and IF are interchangeable.
To keep your code short, you can replace the CASE structure with IF. You can do that by applying the Replace with 'IF' call intention action. The example code will look as follows:
To revert IF to CASE, click IF and apply the Replace with CASE expression intention action.
Suppress an inspection in the editor
Position the caret at the highlighted line and press Alt+Enter or click .
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.