github google/google-java-format v1.10.0
1.10.0

latest releases: v1.24.0, v1.23.0, v1.22.0...
3 years ago

google-java-format now supports running on JDK 16. The following flags are required when running on JDK 16, due to JEP 396: Strongly Encapsulate JDK Internals by Default:

java \
  --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
  --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
  -jar google-java-format-1.10.0-all-deps.jar T...

Other changes:

  • Handle extra ; in import lists (b769e81)
  • Add missing space between unary - and negative literals (6da736d)
  • Fix an off-by-one issue on the reflowing of string literals (b9fd8d2)

Don't miss a new google-java-format release

NewReleases is sending notifications on new releases.