This check is superseded by de.unkrig.Whitespace.
Empty constructor bodies, method bodies, catch blocks and type bodies of the form
public MyClass() {} // empty constructor body
public void func() {} // empty method body
public void func() {
new Object() {
// ...
}.hashCode(); // No space between "}" and "." -- always allowed
try {
// ...
} catch {} // empty catch block
}
interface MyInterface {} // emtpy type body
may optionally be exempted from the policy using the allowEmptyMethods, allowEmptyConstructors, allowEmptyCatches and allowEmptyTypes properties.
| Name | Description |
|---|---|
| allowEmptyCatches | Allow empty catch blocks. |
| allowEmptyConstructors | Allow empty constructor bodies. |
| allowEmptyMethods | Allow empty method bodies. |
| allowEmptyTypes | Allow empty class and interface bodies. |
| ignoreEnhancedForColon |
Ignore the colon (":") token in enhanced FOR statements ("for (x : y) ...").
|
| tokens | Tokens to check. |
Default values are underlined.
For a description of the individual values, click them.
FOR statements ("for (x : y) ...").