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
{{ message }}
Repository navigation
Commit ecc0647
Browse filesBrowse the repository at this point in the historyBrowse files
Conflicts with #43 and #44 in ImportOrderer, RemoveUnusedImports and
their tests.
ImportOrderer: an import now carries both the comments on the lines
before it, from #44, and its declaration rendered from its toks, from
this branch (palantir#1707). This branch's loop
over same-line block comments already covers #44's single block comment
after the `;`, so #44's copy of that step goes. Two interactions are
decided here:
- A javadoc comment right after an import's `;` is no longer an error.
This branch rejected it because the formatter moves it onto a line of
its own, which used to separate the imports. Since #44 a comment
between imports goes with the import after it, and so does this one.
- Two copies of an import that differ only in the comment on the lines
before them no longer collapse into one, so that comment stays. This
branch already kept copies that differ in a comment inside the
declaration.
RemoveUnusedImports: this branch's loop over JCTree with
Trees.getEndPosition, and #43's coalesced ranges and blank-line cleanup.
Tests: every case from both sides. This branch's case for a same-line
block comment repeated #44's and is folded into it. Its javadoc case now
expects the comment to move with the next import. A new case covers the
duplicate.
Checked: all 1493 formatter tests pass. On the JDK 21 sources (15,747
files, Temurin 21) and the JDK 25 sources (15,368 files, Corretto 25),
the merge formats every file exactly as main does, with no errors.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ and published from this repository.
23
23
|[Maven Central](https://central.sonatype.com/namespace/dev.openjavaformat)|`dev.openjavaformat:open-java-format`, with `-spi`, `-native` and `-jdk-bootstrap`|
|[JetBrains Marketplace](https://plugins.jetbrains.com/plugin/34359-open-java-format)| the IntelliJ IDEA plugin |
26
-
|[GitHub Releases](https://github.com/openjavaformat/open-java-format/releases/latest)| native binaries, a runnable jar, the IntelliJ and Eclipse plugins, every file signed |
26
+
|[GitHub Releases](https://github.com/openjavaformat/open-java-format/releases/latest)| native binaries, a runnable jar, the Gradle, IntelliJ and Eclipse plugins, every file signed |
27
27
28
28
Why the project exists is in the [manifesto](https://openjavaformat.dev/manifesto/).
Copy file name to clipboardExpand all lines: gradle-open-java-format/src/main/java/com/palantir/javaformat/gradle/spotless/NativePalantirJavaFormatStep.java
0 commit comments