Even though these semicolons are valid in Java, they are redundant and may be removed.
Example:
class C {
;
void m() throws Exception {
try (AutoCloseable r1 = createAutoCloseable();) {
;
}
}
;
}
After the quick-fix is applied:
class C {
void m() throws Exception {
try (AutoCloseable r1 = createAutoCloseable()) {
}
}
}