Skip to content

Bump dev.openjavaformat:open-java-format from 2.98.0.6 to 21.0.2 - #45

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/maven/main/dev.openjavaformat-open-java-format-21.0.2
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/maven/main/dev.openjavaformat-open-java-format-21.0.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 20, 2026 •

Copy link
Copy Markdown

Bumps dev.openjavaformat:open-java-format from 2.98.0.6 to 21.0.2.

Release notes

Sourced from dev.openjavaformat:open-java-format's releases.

21.0.2

The output is the same as 21.0.1's, so this release needs no reformatting run. It brings a playground that formats Java in the browser, a Gradle plugin that carries the formatter inside it, and the native binary in IntelliJ IDEA for any project.

Playground

  • The formatter is compiled to WebAssembly, and the release carries it as open-java-format-wasm-21.0.2.zip, signed and listed in checksums_sha256.txt like every other file. It runs the playground, which formats Java in the browser and sends nothing anywhere. On all 915 test cases its output matches the runnable jar's byte for byte (#21, #196).

Gradle plugin

  • The formatter comes inside the plugin. A build declares nothing for it and needs no repository for it, and the root project of a multi-project build needs neither a repository nor java. The jars are extracted on first use into ~/.gradle/open-java-format-caches/, and the plugin jar grows from 64 KB to 6.3 MB (#20, #198).
  • Another formatter version is declared in palantirJavaFormat in the root project, as before. It and the native binary now resolve through the repositories of each project that formats: a build that declares repositories only in the root project has to declare them where it formats too (#198).
  • formatDiff and the Spotless step work with Gradle's configuration cache. Up to 21.0.1 they failed with it on (#193, #195).
  • spotlessJava is taken from the build cache only for the same sources, formatter and Spotless settings, and only when it formatted. The cache key holds across directories and machines (#198).
  • Parallel builds work: a subproject no longer resolves the root project's configurations, which Gradle refused with "attempted without an exclusive lock" (#198).
  • Without the --add-exports flags, spotlessJava fails and names them. It used to record a lint of every file, NoClassDefFoundError: Could not initialize class com.palantir.javaformat.java.ImportOrderer, which the build cache kept handing back after the flags were added (#198).
  • openjavaformat.native.formatter decides only how the build runs the formatter. It no longer switches on the native binary in IntelliJ IDEA: tick Use native binary there once (#197).
  • NativePalantirJavaFormatStep, which could never run, is gone (#194, #198).

IntelliJ IDEA plugin

  • The native binary runs in any project, with Gradle, Maven or neither: tick Use native binary in the plugin's settings, now under Tools, and click Download, or choose a binary of your own. Before, only the Gradle plugin could switch it on. On 162 files on Apple silicon, Reformat Code takes 6.0 s with it and 88.6 s with the Java-based formatter (#197).
  • The binary comes from Maven Central, is checked against its SHA-256 and is kept once for the whole IDE. After an update of the plugin, a notification offers the newer binary (#197).
  • The settings page shows the Active formatter and no longer has the Code style list, which never reached the formatter. idea.log says which formatter runs (#197).
  • The plugin's errors go to its page on the JetBrains Marketplace. A release IDE sends them when the user lets it send error reports automatically; an EAP build shows them with Report. The formatter failing to run is now reported, a syntax error in the file being formatted is not (#199).

Library

  • Style.PALANTIR is back as a deprecated alias of Style.OJF and formats the same, so code that names it, or looks it up with Style.valueOf("PALANTIR"), keeps working after the change of coordinates (#200).
  • The formatter depends on org.jspecify:jspecify instead of com.google.code.findbugs:jsr305 (#201).

Thanks

To Guillaume Laforge, for bringing back Style.PALANTIR, and to cobr123, whose open-java-format-wasm-demo showed that the formatter compiles to WebAssembly and was offered for the site.

21.0.1

This is the first release of open-java-format that stands on its own. Up to 2.98.0.6 the version was palantir-java-format's with a build number appended; once the bug fixes made the output differ from upstream, that numbering lost its meaning. The version now follows this project alone: <java>.<minor>.<build>. The first number is the Java version the formatter is built for, 21. The second moves with every change to the output, the third with fixes that leave the output alone. See Versions.

The output differs from 2.98.0.6, so take this release with one reformatting run, in a commit of its own.

From google-java-format

  • A /* ... */ comment left on the line of an opening brace no longer lands one indent too deep, only for the next run to move it back (google/google-java-format#1464 by Tanvir Alam, for google/google-java-format#1260; #143).
  • A comment on its own line right after an opening delimiter, such as for (, the ( of a try with several resources, assert with a detail message or the ; after enum constants, is indented as a continuation, and so is the code after it; both used to land at the indent of the statement. google-java-format fixed the same defect in its new layout builder (google/google-java-format#1501); its code does not apply here, its idea does (#175).
  • Value classes (JEP 401): on a JDK that has them, the value modifier is recognized and put in order, while value, sealed and non stay identifiers where they are names. A lambda parameter named sealed or non no longer fails to parse (1959806 by Liam Miller-Cushon; #141).

Javadoc formatting, which only the formatJavadoc option of the API turns on; the command line and the plugins leave Javadoc as it is:

... (truncated)

Commits
  • 7fe3f70 Merge pull request #200 from glaforge/restore-style-palantir-alias
  • a89167b Merge branch '21.X.X' into restore-style-palantir-alias
  • c7354ce Merge pull request #201 from openjavaformat/abashev/Fix-error-prone-issues
  • fbb6a7c Make EffectivelyPrivate an error
  • 3dc82da Make StringConcatToTextBlock an error
  • 1bf5401 Make CollectorMutability an error
  • 26e9358 Test that the IntelliJ settings keep the implementation classpath
  • 3fb96d7 Make DirectReturn an error
  • 4b60a20 Make CanonicalAnnotationSyntax an error
  • 11f51fe Make RedundantStringConversion an error
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file java Pull requests that update java code labels Nov 20, 2026
@abashev
abashev enabled auto-merge (squash) November 20, 2026 20:54
Bumps [dev.openjavaformat:open-java-format](https://github.com/openjavaformat/open-java-format) from 2.98.0.6 to 21.0.2.
- [Release notes](https://github.com/openjavaformat/open-java-format/releases)
- [Commits](openjavaformat/open-java-format@2.98.0.6...21.0.2)

---
updated-dependencies:
- dependency-name: dev.openjavaformat:open-java-format
  dependency-version: 21.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/maven/main/dev.openjavaformat-open-java-format-21.0.2 branch from 1a5b9df to 0027648 Compare November 20, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants