René's URL Explorer Experiment


Title: Use records instead of Immutables for plain value types by abashev · Pull Request #98 · openjavaformat/open-java-format · GitHub

Open Graph Title: Use records instead of Immutables for plain value types by abashev · Pull Request #98 · openjavaformat/open-java-format

X Title: Use records instead of Immutables for plain value types by abashev · Pull Request #98 · openjavaformat/open-java-format

Description: Follows #97: it builds on that PR's conventions. Immutables generated eleven types. This turns the eight that are plain values into records and leaves the three that cannot be records as they stand. What changes open-java-format-jdk-bootstrap. FormatterCliArgs and FormatterNativeImageArgs, the arguments of a formatter process, are records built through their constructors. The module no longer runs the Immutables processor. open-java-format. State's BreakState, LevelState and TokState, Level's SplitsBreaks, OpsBuilder's OpsOutput and InputMetadata are records. The call sites use constructors instead of builders and of(...); the accessors keep their names. What stays on Immutables OpenOp and Break extend HasUniqueId, whose per-instance id orders the formatter's persistent collections, and a record cannot extend a class. They need the Doc hierarchy reworked first. State copies itself through its builder in about a dozen places. As a record each copy would list all ten components, or it would need a hand-written builder. It is created in the layout's hot loop, so that change wants a JMH measurement of its own. Worth a look InputMetadata keeps @Immutable, which Error Prone now checks against the record's components; before, the generated class was excluded from analysis. That needed @Immutable on OpsBuilder.BlankLineWanted as well. Its two subclasses hold only an Optional and an ImmutableList, and Error Prone verifies them. Checked The 15,747 files of the JDK 21 sources format byte for byte as before: diff -rq of the trees formatted by the allJar of #97's head, which main now holds, and of this branch. ./gradlew test: 1597 tests in :open-java-format and 10 in the IDEA plugin. With -PnativeImage=true, 60 in the Gradle plugin and 8 in jdk-bootstrap, whose FormatterServicesTest runs both changed services against a JDK and the native image. formatDiff through the released plugin.

Open Graph Description: Follows #97: it builds on that PR's conventions. Immutables generated eleven types. This turns the eight that are plain values into records and leaves the three that cannot be records as they s...

X Description: Follows #97: it builds on that PR's conventions. Immutables generated eleven types. This turns the eight that are plain values into records and leaves the three that cannot be records as th...

Opengraph URL: https://github.com/openjavaformat/open-java-format/pull/98

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:c4ac2987-4267-f7b0-9f17-3be3456fd21c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC9F2:3747A5:6906EF:8F55F5:6AFBC677
html-safe-noncec7bf49efe8f01311c0ade490786ad8a3cdb26bc46499762c419582f4f35ea2b6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUYyOjM3NDdBNTo2OTA2RUY6OEY1NUY1OjZBRkJDNjc3IiwidmlzaXRvcl9pZCI6IjMwMTU3MDI0OTI1ODgyNjMwMzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac99f78546ba1410a58aba3a1fca1ec7463dd9c1367e9cb23386a65e9f1e3e27f3
hovercard-subject-tagpull_request:4720175999
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/openjavaformat/open-java-format/pull/98/files
twitter:imagehttps://avatars.githubusercontent.com/u/214171?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/214171?s=400&v=4
og:image:altFollows #97: it builds on that PR's conventions. Immutables generated eleven types. This turns the eight that are plain values into records and leaves the three that cannot be records as they s...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned440bda0d812801778b27bfe9f7c1ce9ff22420c73f6f95150c4fcbca311c50b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/openjavaformat/open-java-format git https://github.com/openjavaformat/open-java-format.git
octolytics-dimension-user_id325177626
octolytics-dimension-user_loginopenjavaformat
octolytics-dimension-repository_id1288055459
octolytics-dimension-repository_nwoopenjavaformat/open-java-format
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id214273098
octolytics-dimension-repository_parent_nwopalantir/palantir-java-format
octolytics-dimension-repository_network_root_id214273098
octolytics-dimension-repository_network_root_nwopalantir/palantir-java-format
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2c43021aed8695990c86c0eaaedc600bfeffec36
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/openjavaformat/open-java-format/pull/98/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F98%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F98%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=openjavaformat%2Fopen-java-format
Reloadhttps://github.com/openjavaformat/open-java-format/pull/98/files
Reloadhttps://github.com/openjavaformat/open-java-format/pull/98/files
Reloadhttps://github.com/openjavaformat/open-java-format/pull/98/files
openjavaformathttps://github.com/openjavaformat
open-java-formathttps://github.com/openjavaformat/open-java-format
Codehttps://github.com/openjavaformat/open-java-format
Issues30 (30)https://github.com/openjavaformat/open-java-format/issues
Pull requests5 (5)https://github.com/openjavaformat/open-java-format/pulls
Discussionshttps://github.com/openjavaformat/open-java-format/discussions
Actionshttps://github.com/openjavaformat/open-java-format/actions
Security and qualityhttps://github.com/openjavaformat/open-java-format/security
Insightshttps://github.com/openjavaformat/open-java-format/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fopenjavaformat%2Fopen-java-format%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fopenjavaformat%2Fopen-java-format%2Fissues%2Fnew%2Fchoose
abashevhttps://github.com/abashev
mainhttps://github.com/openjavaformat/open-java-format/tree/main
records-instead-of-immutableshttps://github.com/openjavaformat/open-java-format/tree/records-instead-of-immutables
Conversation 0 https://github.com/openjavaformat/open-java-format/pull/98
Commits 4 https://github.com/openjavaformat/open-java-format/pull/98/commits
Checks 16 https://github.com/openjavaformat/open-java-format/pull/98/checks
Files changed https://github.com/openjavaformat/open-java-format/pull/98/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/98/files
Use records instead of Immutables for plain value types https://github.com/openjavaformat/open-java-format/pull/98/files#top
Show all changes 4 commits https://github.com/openjavaformat/open-java-format/pull/98/files
0e13e32 Use records for the bootstrap's command-line arguments abashev Oct 2, 2026 https://github.com/openjavaformat/open-java-format/pull/98/commits/0e13e32e235382233c71d0293caa84729ca36494
90d3a13 Use records for the formatter's plain value types abashev Oct 2, 2026 https://github.com/openjavaformat/open-java-format/pull/98/commits/90d3a135672ad9a80835a828a03053d87ad9db79
679e5a7 Merge remote-tracking branch 'origin/main' into records-instead-of-im… abashev Oct 2, 2026 https://github.com/openjavaformat/open-java-format/pull/98/commits/679e5a732da7912ac6656cd62f913f39c0770b39
4f407a9 Merge branch 'main' into records-instead-of-immutables abashev Oct 2, 2026 https://github.com/openjavaformat/open-java-format/pull/98/commits/4f407a985f09d43ff0f1b514778dcc7860338a4d
Clear filters https://github.com/openjavaformat/open-java-format/pull/98/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/98/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/98/files
build.gradle https://github.com/openjavaformat/open-java-format/pull/98/files#diff-5bde59e106fe9f41de2e6fde825ef510589dad66f2aa5d3d981bf4b063ec38bb
BootstrappingFormatterService.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
NativeImageFormatterService.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
OpsBuilder.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
Comment.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-e5edd350ffddfcafc80bdd6ecdc1c4886762bbe5cbe46051ef998085326d4252
Level.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
State.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1ff12ce403973609c3e83ee0788d34b457faa75e867b6ae490167d437f563fca
InputMetadata.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-6efd37b16accfe1da12b2262da34616640b1580d0acc8d6715a2b33c0974bd07
InputMetadataBuilder.java https://github.com/openjavaformat/open-java-format/pull/98/files#diff-7797cbb337e5ee21c2790fbdb55b2131bc37a46ce930f21315abc4fe644785dd
open-java-format-jdk-bootstrap/build.gradlehttps://github.com/openjavaformat/open-java-format/pull/98/files#diff-5bde59e106fe9f41de2e6fde825ef510589dad66f2aa5d3d981bf4b063ec38bb
View file https://github.com/openjavaformat/open-java-format/blob/4f407a985f09d43ff0f1b514778dcc7860338a4d/open-java-format-jdk-bootstrap/build.gradle
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/98/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-5bde59e106fe9f41de2e6fde825ef510589dad66f2aa5d3d981bf4b063ec38bb
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-5bde59e106fe9f41de2e6fde825ef510589dad66f2aa5d3d981bf4b063ec38bb
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-5bde59e106fe9f41de2e6fde825ef510589dad66f2aa5d3d981bf4b063ec38bb
...tstrap/src/main/java/com/palantir/javaformat/bootstrap/BootstrappingFormatterService.javahttps://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
View file https://github.com/openjavaformat/open-java-format/blob/4f407a985f09d43ff0f1b514778dcc7860338a4d/open-java-format-jdk-bootstrap/src/main/java/com/palantir/javaformat/bootstrap/BootstrappingFormatterService.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/98/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
https://github.com/openjavaformat/open-java-format/actions/runs/37061439257/job/111018780262?pr=98
https://github.com/openjavaformat/open-java-format/actions/runs/37061439257/job/111018780262?pr=98
@nullablehttps://github.com/nullable
@nonnullhttps://github.com/nonnull
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-1b8393c2c6dbe9ef0676356eb5c44176a9daeb00039ae32c7144efee19655739
...ootstrap/src/main/java/com/palantir/javaformat/bootstrap/NativeImageFormatterService.javahttps://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
View file https://github.com/openjavaformat/open-java-format/blob/4f407a985f09d43ff0f1b514778dcc7860338a4d/open-java-format-jdk-bootstrap/src/main/java/com/palantir/javaformat/bootstrap/NativeImageFormatterService.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/98/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
https://github.com/openjavaformat/open-java-format/actions/runs/37061439257/job/111018780262?pr=98
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-40904604aa1c7b5d67c99d9e34c8341953bf0b26964835329219155463e35797
open-java-format/src/main/java/com/palantir/javaformat/OpsBuilder.javahttps://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
View file https://github.com/openjavaformat/open-java-format/blob/4f407a985f09d43ff0f1b514778dcc7860338a4d/open-java-format/src/main/java/com/palantir/javaformat/OpsBuilder.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/98/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-8fde53d5c7976d369ff9f2bb92828e5db2c64633df01fc1c75de795586ea6cd9
open-java-format/src/main/java/com/palantir/javaformat/doc/Comment.javahttps://github.com/openjavaformat/open-java-format/pull/98/files#diff-e5edd350ffddfcafc80bdd6ecdc1c4886762bbe5cbe46051ef998085326d4252
View file https://github.com/openjavaformat/open-java-format/blob/4f407a985f09d43ff0f1b514778dcc7860338a4d/open-java-format/src/main/java/com/palantir/javaformat/doc/Comment.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/98/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-e5edd350ffddfcafc80bdd6ecdc1c4886762bbe5cbe46051ef998085326d4252
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-e5edd350ffddfcafc80bdd6ecdc1c4886762bbe5cbe46051ef998085326d4252
open-java-format/src/main/java/com/palantir/javaformat/doc/Level.javahttps://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
View file https://github.com/openjavaformat/open-java-format/blob/4f407a985f09d43ff0f1b514778dcc7860338a4d/open-java-format/src/main/java/com/palantir/javaformat/doc/Level.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/98/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
https://github.com/openjavaformat/open-java-format/pull/98/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/98/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/98/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.