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
Two pull requests are open against palantir-java-format and not merged. Both stop the formatter from crashing on newer Java, and this fork has neither change.
The formatter fails on import module …; (JEP 511), on compact source files with an instance main (JEP 512) and on unnamed patterns such as case Box(_, _) (JEP 456)
+981 −67, 40 files
Open since 2026-07-03. Reviewed in depth by a community member, several +1s, no maintainer response
NoSuchFieldError on JDK 27, where JDK-8372948 removed EndPosTable and JCCompilationUnit.endPositions, plus the re-ordered ParserFactory.newParser flags
+87 −6, 5 files
Open since 2026-09-15. Waiting on the CLA, whose signing page returns an error for the author
Checked here: open-java-format has no handling of JCModuleImport, IMPLICIT_CLASS or ANY_PATTERN, and Trees.getEndPosition still reads endPositions directly.
Why here
A fix that waits for months because nobody upstream picks it up is the case manifesto principle 6 describes. People on Java 25 cannot format these files today, and JDK 27 will break every user at once.
The version number. So far the fourth number counts rebuilds of an upstream version. A release that carries patches upstream does not have needs a stated rule.
The next upstream sync. If upstream merges either PR, the carried commits are dropped in favour of upstream's.
How
Keep the authorship: cherry-pick with the original authors, or squash with Co-authored-by, and name the upstream PR in the commit message.
Rewrite the paths while applying. Upstream's modules are palantir-java-format/… and palantir-java-format-native/…, here they are open-java-format/… and open-java-format-native/…. The Java packages are the same, so the code itself should apply cleanly.
What
Two pull requests are open against palantir-java-format and not merged. Both stop the formatter from crashing on newer Java, and this fork has neither change.
import module …;(JEP 511), on compact source files with an instancemain(JEP 512) and on unnamed patterns such ascase Box(_, _)(JEP 456)NoSuchFieldErroron JDK 27, where JDK-8372948 removedEndPosTableandJCCompilationUnit.endPositions, plus the re-orderedParserFactory.newParserflagsChecked here:
open-java-formathas no handling ofJCModuleImport,IMPLICIT_CLASSorANY_PATTERN, andTrees.getEndPositionstill readsendPositionsdirectly.Why here
A fix that waits for months because nobody upstream picks it up is the case manifesto principle 6 describes. People on Java 25 cannot format these files today, and JDK 27 will break every user at once.
To decide first
ImportOrdererrewrite in Format module imports, compact source files, and unnamed patterns palantir/palantir-java-format#1707, which stops re-synthesising import declarations.How
Co-authored-by, and name the upstream PR in the commit message.palantir-java-format/…andpalantir-java-format-native/…, here they areopen-java-format/…andopen-java-format-native/…. The Java packages are the same, so the code itself should apply cleanly.changelog/@unreleased/*.ymland thegradle/jdks/25/**files. The README changes of Format module imports, compact source files, and unnamed patterns palantir/palantir-java-format#1707 need rewording for this README.ImportTree#isModulein the native image'sreachability-metadata.json. Carry that over toopen-java-format-native.build.gradle. CI tests on JDK 21 today, so that needs a toolchain or a matrix entry.Done when
mainwith their authors credited;import module.