The Braces Checkerset contains a collection of braces checkers.
Avoid using if statements without using curly braces
Here's an example of code that would trigger this checker:
public class Foo {
public void bar() {
int x = 0;
if (foo) x++;
}
}
Avoid using 'while' statements without using curly braces
Here's an example of code that would trigger this checker:
public void doSomething() {
while (true)
x++;
}