You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
google-java-format#1491 (merged 2026-10-22, copybara export) extends the --cleanup AST pass from google-java-format#1492 so that stray ; are deleted at top level, in class and enum bodies, and as empty statements in blocks. Upstream also moves several existing goldens (for example the semicolon-in-class case) into a "changed by cleanup" set.
Why it matters: our formatter keeps these semicolons, e.g. our golden SemicolonInClass still outputs a lone ; inside the class. It is a harmless tidy-up with a small footprint, but like brace insertion it is a non-whitespace rewrite and should only come with an opt-out.
Examples: not available - the diff shows only the removal of the ;, not the resulting layout of the emptied body in our formatter; our current output keeps the lone ; as in the golden above.
Affected files in our repo:
open-java-format/src/main/java/com/palantir/javaformat/java/JavaInputAstVisitor.java (visitEmptyStatement, class body member handling)
open-java-format/src/test/resources/com/palantir/javaformat/java/testdata/SemicolonInClass.input and .output
Suggested action: watch / adopt-the-idea together with the brace-insertion ticket; low priority on its own.
Filed from an upstream-watch ticket after manual review.
Activity