EmptyTopLevelDeclaration
Empty top-level type declaration

Category
Severity
WARNING
Maturity

The problem

A semi-colon at the top level of a Java file is treated as an empty type declaration in the grammar, but it’s confusing and unnecessary.

Suppression

Suppress false positives by adding an @SuppressWarnings("EmptyTopLevelDeclaration") annotation to the enclosing element.