else keywords in
else statements and statement chains.
else keyword is redundant when all previous branches end with a
continue statement. In this case, the statements from the
else branch can be placed after the
if statement, and the
else keyword can be removed.
After the quick-fix is applied:
Disable the Report when there are no more statements after the 'if' statement option to ignore cases where the
else statement is the last statement in a code block.
Report when there are no more statements after the 'if' statement
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3