Code block contains single statement
Reports control flow statements with a single statement in their code block and suggests removing the braces from the control flow statement body.
Example:
if (x > 0) {
System.out.println("x is positive");
}
After the quick-fix is applied:
if (x > 0) System.out.println("x is positive");
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SingleStatementInBlock
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |