Skip to content

Releases: openjavaformat/open-java-format

2.98.0.4

Choose a tag to compare

@github-actions github-actions released this 25 Sep 19:37
Immutable release. Only release title and notes can be modified.
b853b9f

Changelog

  • b853b9f Merge pull request #81 from openjavaformat/plugin-descriptor-public-api
  • 789e9ea Remove too much coupling
  • 1985d55 Let the version test accept what CI stamps into the plugin
  • a58bdc7 Make it safer
  • 4479a4f Merge pull request #82 from openjavaformat/dependency-graph-runtime-only
  • 454837b Submit only runtimeClasspath to the dependency graph
  • 462a18c Merge pull request #80 from openjavaformat/jetbrains-marketplace-publishing
  • b48ba48 Merge pull request #79 from openjavaformat/format-diff-javac-exports-message
  • ad8dd4b Take the plugin descriptor from PluginAware, not from PluginManager
  • c4a837a Upload the IntelliJ plugin unsigned
  • e673437 Publish the IntelliJ plugin to the JetBrains Marketplace on release
  • 2dc5197 Write the javac exports message as a text block
  • a9f92e5 Say how to run the formatter when the Gradle JVM hides javac
  • a427d59 Merge pull request #78 from openjavaformat/cast-type-without-breaks
  • d564203 Give the cast golden an input that has to be laid out afresh
  • b58f5c6 Measure the whole type of a cast before inlining a chain onto it
  • 8a39a6a Merge pull request #77 from openjavaformat/comment-before-lambda-close-parens
  • bf9e0eb Do not inline a lambda body whose closing paren carries a comment
  • 7f2a32d Merge pull request #74 from openjavaformat/javadoc-banner-comments
  • 4978dca Merge pull request #71 from openjavaformat/overlapping-lines-ranges
  • 98a80c6 Merge pull request #76 from openjavaformat/switch-expression-declaration
  • 522fab5 Keep an input in the old shape in the switch expression golden
  • 8cc4259 Merge pull request #73 from openjavaformat/trailing-tabs-in-comments
  • 58947f8 Merge pull request #75 from openjavaformat/javadoc-snippet
  • 037a7fd Merge pull request #72 from openjavaformat/diagnostic-column
  • 1eb4e5b Merge pull request #66 from openjavaformat/member-reference-type-annotation
  • 30fa1cc Merge pull request #65 from openjavaformat/parameter-array-dims-annotation
  • 34ddeaa Merge pull request #68 from openjavaformat/semicolon-only-class-body
  • b1f0450 Merge pull request #70 from openjavaformat/single-letter-type-name
  • 1760d93 Merge pull request #69 from openjavaformat/tabular-mixed-sign-initializer
  • 2c63af6 Merge pull request #67 from openjavaformat/non-sealed-modifier-order
  • d6d4a71 Merge pull request #64 from openjavaformat/unary-minus-literal
  • 610278d Don't break line when switch expression used in declaration assignment (palantir#1789)
  • eb20cda Keep a javadoc {@snippet} as it is written
  • 49ff83d Leave a comment that opens with "/***" out of javadoc formatting
  • 17f6a1b Drop trailing tabs from comments instead of writing them out
  • da047d7 Report the column of a syntax error where javac puts it
  • a5c9010 Merge --lines ranges that overlap instead of rejecting them
  • 010cef1 Treat a single upper case letter as a type name in a dotted chain
  • f4bf910 Keep a tabular array initializer with mixed signs in rows
  • 956f1d8 Cover the other bodies that can hold only semicolons
  • a1b84fb Format a class body that holds nothing but semicolons
  • 6282d12 Reorder non-sealed as one modifier
  • af4b138 Accept a type annotation on the qualifier of a method reference
  • 4ed1716 Accept an annotated C-style array dimension on a parameter
  • 307e091 Keep the space between a unary minus and a negative literal
  • 746fb60 Add zizmor to CI cycle
  • a079cbb Merge pull request #59 from openjavaformat/long-generic-field-type-golden
  • dc50f40 Cover how a long generic field type wraps
  • 86cdc74 Bump graalvm/setup-graalvm from 1.6.4 to 1.6.6 (#57)
  • 06da4e3 Merge pull request #58 from openjavaformat/readme-output-bug-fixes
  • ac92c87 Say in the README that bug fixes can change the output
  • 2b66571 Bump github/codeql-action/analyze from 4.38.0 to 4.38.1 (#54)
  • 585fdc2 Bump zgosalvez/github-actions-ensure-sha-pinned-actions (#56)
  • b93d8a1 Bump github/codeql-action/init from 4.38.0 to 4.38.1 (#55)
  • c333fbd Bump com.fasterxml.jackson.module:jackson-module-parameter-names (#52)
  • 561972c Bump com.palantir.gradle.idea-configuration:gradle-idea-configuration (#53)
  • 0d83e31 Bump com.fasterxml.jackson.datatype:jackson-datatype-jdk8 (#51)

Contributors

We'd like to thank the following people for their contributions:
Alex Abashev, Alexey Abashev, Andrew Reid, Eckert, Alexander, GitHub, Liam Miller-Cushon, Patrick Koenig, cpovirk, cushon, dependabot[bot], google-java-format Team

2.98.0.3

Choose a tag to compare

@github-actions github-actions released this 23 Sep 15:42
Immutable release. Only release title and notes can be modified.
a8e4ae3

Changelog

  • a8e4ae3 Merge pull request #30 from openjavaformat/upstream-prs-1707-1786
  • ecc0647 Merge main into upstream-prs-1707-1786
  • 43f5d3d Merge pull request #49 from openjavaformat/argfile-quotes
  • 9c98a31 Sign the Gradle plugins on the Plugin Portal with the release key
  • da12ddc Put the Gradle plugins' jar in the GitHub release, signed like the rest
  • 43df12f Merge pull request #47 from openjavaformat/close-thread-pool
  • c5f3de1 Merge pull request #48 from openjavaformat/dry-run-replace-message
  • 67c0111 Release everything from a tag, publishing only once both deployments are in
  • c10548d Shut down the command line's thread pool when formatting is done
  • c73a083 Name --replace in the error for --dry-run with in-place formatting
  • f5e6b12 Read quoted arguments from parameter files, and refuse a file that includes itself
  • e2142e5 Merge pull request #46 from openjavaformat/upstream-pr-1784
  • f38b759 Merge pull request #43 from openjavaformat/unused-import-blank-line
  • c6f717f Merge pull request #44 from openjavaformat/comments-between-imports
  • eda37c1 Merge pull request #42 from openjavaformat/multiline-comment-column
  • 0ef517a Merge pull request #41 from openjavaformat/comment-nbsp-wrap
  • 95c738a Cover two more text blocks that settled only on a second run
  • e2c90fd Run the string wrapping pass to a fixed point
  • 56c7a01 Keep comments between imports with the import after them
  • 3632838 Stop an unused import from leaving two blank lines behind
  • 30b63ba Stop comments that share a line from doubling each other's indent
  • 3810d50 Stop breaking line comments at a no-break space
  • 53ac7d8 Stop splitting long strings inside an escaped backslash
  • 39f69dc Stop passing --ojf from the benchmarks and the Gradle plugin's native step
  • 9182725 Stop deeply nested calls from taking exponential time to format
  • 894f4a5 Stop passing --ojf to the formatter process
  • b2fd323 Resolve buildSrc's dependencies from Maven Central first
  • aed6a78 Leave the Gradle plugin's tests out of the JDK 27 job
  • 4e6ca5e Show a failing test's whole exception in the log
  • 9c315d6 Print var from its token, now that JDK 27 gives it a type node
  • 97358ba Smoke-test the native binary on Java 25 syntax
  • 5e99868 Check that the tests run on the JDK the jdk job asked for
  • 60f39af Register the javac end-position API for the native image
  • b2e270b Format module imports, compact source files and unnamed patterns
  • 4a89e1e Support JDK 27 end positions (JDK-8372948)
  • 31e51b0 Run the tests on JDK 25, 26 and 27 as well
  • a2c8970 Merge pull request #28 from openjavaformat/windows-native-gradle
  • e96548e Expect a platform path in the git diff parsing test
  • a60e060 Compare line-ending-neutral in the two tests that failed on Windows
  • e530bbe Run the native formatter from the Gradle plugin on Windows

Contributors

We'd like to thank the following people for their contributions:
Alex Abashev, Alexey Abashev, Claude Opus 5 (1M context), GitHub, Karlheinz Friedberger, Sylwester Lachiewicz, Zayan Khan, arimu1, asm0dey, rootkiller6788

2.98.0.2

Choose a tag to compare

@github-actions github-actions released this 21 Sep 18:28
Immutable release. Only release title and notes can be modified.
4958189

Changelog

  • 4958189 Give the native jobs a JDK 21, which Gradle does not find on Windows
  • e8c0ee1 Format in one style with clear exit codes, and build a native binary for Windows
  • 7f06ca1 Rewrite the README for a released, independently developed project
  • 7ceda6b Move the manifesto and the icon sources to the website repository
  • 340a181 Replace deprecated IDE APIs in the IDEA plugin
  • 3f6c827 Describe the IDEA plugin for the marketplace in plugin.xml
  • f536e9f Bump github/codeql-action/analyze from 4.37.9 to 4.38.0 (#17)
  • 60155b7 Bump zgosalvez/github-actions-ensure-sha-pinned-actions (#18)
  • 61245f0 Bump org.eclipse.platform:org.eclipse.jface.text (#12)
  • a8b06ee Bump mikepenz/action-junit-report from 6.4.2 to 6.5.0 (#15)
  • 730b6a9 Bump actions/setup-java from 6.0.0 to 6.0.1 (#16)
  • 33c43c5 Bump github/codeql-action/init from 4.37.9 to 4.38.0 (#14)
  • e290151 Bump org.eclipse.platform:org.eclipse.text from 3.10.200 to 3.14.800 (#11)
  • e4133cd Bump com.palantir.javaformat:gradle-palantir-java-format (#13)

Contributors

We'd like to thank the following people for their contributions:
Alex Abashev, Alexey Abashev, GitHub, dependabot[bot]

2.98.0.1

Choose a tag to compare

@github-actions github-actions released this 15 Sep 18:28
30575fc

Code-wise this is palantir-java-format 2.98.0, renamed to open-java-format. What changed is the build: every file of this release, here and on Maven Central, was built and signed on GitHub Actions.

For now the fourth number counts rebuilds of the upstream version: 2.98.0.1 is the first build of 2.98.0.

Requirements: Java 21 or later. The Gradle plugins need Gradle 9.

Style flag: --ojf

Without a style flag the formatter uses Google Java Style. --ojf (or -ojf) selects the 120-column style that --palantir used to; --palantir is no longer accepted. The jar and the native binaries take the same flags.

Runnable jar

open-java-format-2.98.0.1-all.jar carries every dependency and the Add-Exports the formatter needs, so no JVM flags are required:

curl -LO https://github.com/openjavaformat/open-java-format/releases/download/2.98.0.1/open-java-format-2.98.0.1-all.jar
java -jar open-java-format-2.98.0.1-all.jar --ojf --replace Foo.java

Native binaries

No Java needed. Pick the file for your platform:

Platform File
Linux x86-64 (glibc) open-java-format-linux-glibc_x86-64
Linux AArch64 (glibc) open-java-format-linux-glibc_aarch64
macOS Apple silicon open-java-format-macos_aarch64
macOS Intel open-java-format-macos_x86-64
curl -LO https://github.com/openjavaformat/open-java-format/releases/download/2.98.0.1/open-java-format-macos_aarch64
chmod +x open-java-format-macos_aarch64
./open-java-format-macos_aarch64 --ojf --replace Foo.java

macOS refuses to run a binary downloaded with a browser; clear the quarantine flag first with xattr -d com.apple.quarantine open-java-format-macos_aarch64. There is no Windows binary yet — use the jar.

Handy flags

Flag What it does
--replace, -i Write the result back to the files instead of printing it
--dry-run --set-exit-if-changed Print the files that would change and exit with 1, for CI
- Format stdin to stdout
--help List every option