René's URL Explorer Experiment


Title: Replace derive4j with a sealed interface and records by abashev · Pull Request #99 · openjavaformat/open-java-format · GitHub

Open Graph Title: Replace derive4j with a sealed interface and records by abashev · Pull Request #99 · openjavaformat/open-java-format

X Title: Replace derive4j with a sealed interface and records by abashev · Pull Request #99 · openjavaformat/open-java-format

Description: Follows #98 and targets its branch, so this diff shows only its own change; once #98 is merged it goes to main. derive4j generated BreakBehaviours for one type, BreakBehaviour: four cases, two of them with a keepIndentWhenInlined flag. Standard Java does the same job now, and open-java-format no longer runs the derive4j processor. What changes BreakBehaviour is a sealed interface whose cases are records: BreakThisLevel, PreferBreakingLastInnerLevel, InlineSuffix and BreakOnlyIfInnerLevelsThenFitOnOneLine. The factories the 25 call sites used moved from BreakBehaviours onto BreakBehaviour, with the same names. Level picks the case with a switch over record patterns instead of the Cases visitor and the caseOf chains, so the compiler checks that every case is handled. The JSON serializer and LevelDelimitedFlatValueDocVisitor switch the same way. Each case keeps derive4j's toString, such as preferBreakingLastInnerLevel(true), which the debug visitor prints, and the JSON keeps its shape: {"type": ..., "keepIndentWhenInlined": ...}. Level.BreakImpl.preferBreakingLastInnerLevel never read the flag and now takes no parameter. Error Prone's UnusedVariable said so once the method no longer implemented an interface. Checked The 15,747 files of the JDK 21 sources format byte for byte as with #98's head. ./gradlew test: 1597 tests in :open-java-format, 10 in the IDEA plugin, 51 in the Gradle plugin. With -PnativeImage=true, the native image compiles from this and the Gradle plugin's 60 tests and jdk-bootstrap's 8 pass against it. formatDiff through the released plugin, which reshaped the new switches.

Open Graph Description: Follows #98 and targets its branch, so this diff shows only its own change; once #98 is merged it goes to main. derive4j generated BreakBehaviours for one type, BreakBehaviour: four cases, two of t...

X Description: Follows #98 and targets its branch, so this diff shows only its own change; once #98 is merged it goes to main. derive4j generated BreakBehaviours for one type, BreakBehaviour: four cases, two of t...

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

X: @github

direct link

Domain: redirect.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:4e143e43-4e4f-854d-445c-39d6fb8ec6b2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDD70:E5741:53D3A:6F76F:6AFBD8EC
html-safe-noncef3ce4b474ae460c5b04a3adfb6ef05760471c3a2a4b958b3e4c754d7668cda98
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDcwOkU1NzQxOjUzRDNBOjZGNzZGOjZBRkJEOEVDIiwidmlzaXRvcl9pZCI6IjQ3MTkwMTg0NzI3MjAwMjk5MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccc50ce2f24d6f33d28983fbbed7b6f7fc52db69ea497fa98b9162b7947553e29
hovercard-subject-tagpull_request:4720524190
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/99/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 #98 and targets its branch, so this diff shows only its own change; once #98 is merged it goes to main. derive4j generated BreakBehaviours for one type, BreakBehaviour: four cases, two of t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None18742cb872ec73544356e60359266b67aafece70c4ce008042e06227924cdd07
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
release820be804f18e1ef3940bd74a00d41d73d02e2b91
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#start-of-content
https://redirect.github.com/
Sign inhttps://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F99%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://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F99%2Ffiles
Sign uphttps://redirect.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://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Reloadhttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Reloadhttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files
openjavaformathttps://redirect.github.com/openjavaformat
open-java-formathttps://redirect.github.com/openjavaformat/open-java-format
Codehttps://redirect.github.com/openjavaformat/open-java-format
Issues30 (30)https://redirect.github.com/openjavaformat/open-java-format/issues
Pull requests5 (5)https://redirect.github.com/openjavaformat/open-java-format/pulls
Discussionshttps://redirect.github.com/openjavaformat/open-java-format/discussions
Actionshttps://redirect.github.com/openjavaformat/open-java-format/actions
Security and qualityhttps://redirect.github.com/openjavaformat/open-java-format/security
Insightshttps://redirect.github.com/openjavaformat/open-java-format/pulse
Sign up for GitHub https://redirect.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://redirect.github.com/login?return_to=%2Fopenjavaformat%2Fopen-java-format%2Fissues%2Fnew%2Fchoose
abashevhttps://redirect.github.com/abashev
mainhttps://redirect.github.com/openjavaformat/open-java-format/tree/main
break-behaviour-without-derive4jhttps://redirect.github.com/openjavaformat/open-java-format/tree/break-behaviour-without-derive4j
Conversation 0 https://redirect.github.com/openjavaformat/open-java-format/pull/99
Commits 1 https://redirect.github.com/openjavaformat/open-java-format/pull/99/commits
Checks 12 https://redirect.github.com/openjavaformat/open-java-format/pull/99/checks
Files changed https://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Please reload this pagehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Replace derive4j with a sealed interface and records https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#top
Show all changes 1 commit https://redirect.github.com/openjavaformat/open-java-format/pull/99/files
4c647aa Replace derive4j with a sealed interface and records abashev Oct 2, 2026 https://redirect.github.com/openjavaformat/open-java-format/pull/99/commits/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137
Clear filters https://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Please reload this pagehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Please reload this pagehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files
open-java-format.error-prone-conventions.gradle https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-a28c5aad0622a176a0170206c743b02fc4e3f69f80f1fa41bb186f9558b91128
libs.versions.toml https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-697f70cdd88ba88fe77eebda60c7e143f6ad1286bca75017421e93ad84fb87df
build.gradle https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-f6f93c0182b25d88fe38485eef34966713b3eed089666d541adfe0c19a7abe22
BreakBehaviour.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-b406cf3c095217affa1a2965a465fe5f4e9db30f67c56683c6a651906d742e5d
LastLevelBreakability.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-9766e71aa624fbeba8332c6871e063d33b0f1606c78ce37da680f87ac93ea40e
OpenOp.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-717f9db8d6426a19eefff0be2b37a821191366a71a64cc6ddbc2024deadb42bd
PartialInlineability.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-c8d10e7202b7449d8c7a279b84c72ca20731a430f87f3a9e9b908fa87f00702c
Level.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-fa5e6dffd4fb7354b4706d7c0d77bcaa3de70917d0983a2c8ed1c575eed87611
LevelDelimitedFlatValueDocVisitor.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-a10f54ffbba399368d5cba80119e023e5405a91b9a3e0d50213df04505486d30
JavaInputAstVisitor.java https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-4c56c3f402a5387ffa98b467fa35d91986b454b87e4a1b47b11da48e30272fc3
buildSrc/src/main/groovy/open-java-format.error-prone-conventions.gradlehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-a28c5aad0622a176a0170206c743b02fc4e3f69f80f1fa41bb186f9558b91128
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/buildSrc/src/main/groovy/open-java-format.error-prone-conventions.gradle
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-a28c5aad0622a176a0170206c743b02fc4e3f69f80f1fa41bb186f9558b91128
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-a28c5aad0622a176a0170206c743b02fc4e3f69f80f1fa41bb186f9558b91128
gradle/libs.versions.tomlhttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-697f70cdd88ba88fe77eebda60c7e143f6ad1286bca75017421e93ad84fb87df
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/gradle/libs.versions.toml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-697f70cdd88ba88fe77eebda60c7e143f6ad1286bca75017421e93ad84fb87df
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-697f70cdd88ba88fe77eebda60c7e143f6ad1286bca75017421e93ad84fb87df
open-java-format/build.gradlehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-f6f93c0182b25d88fe38485eef34966713b3eed089666d541adfe0c19a7abe22
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/open-java-format/build.gradle
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-f6f93c0182b25d88fe38485eef34966713b3eed089666d541adfe0c19a7abe22
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-f6f93c0182b25d88fe38485eef34966713b3eed089666d541adfe0c19a7abe22
open-java-format/src/main/java/com/palantir/javaformat/BreakBehaviour.javahttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-b406cf3c095217affa1a2965a465fe5f4e9db30f67c56683c6a651906d742e5d
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/open-java-format/src/main/java/com/palantir/javaformat/BreakBehaviour.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-b406cf3c095217affa1a2965a465fe5f4e9db30f67c56683c6a651906d742e5d
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-b406cf3c095217affa1a2965a465fe5f4e9db30f67c56683c6a651906d742e5d
open-java-format/src/main/java/com/palantir/javaformat/LastLevelBreakability.javahttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-9766e71aa624fbeba8332c6871e063d33b0f1606c78ce37da680f87ac93ea40e
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/open-java-format/src/main/java/com/palantir/javaformat/LastLevelBreakability.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-9766e71aa624fbeba8332c6871e063d33b0f1606c78ce37da680f87ac93ea40e
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-9766e71aa624fbeba8332c6871e063d33b0f1606c78ce37da680f87ac93ea40e
open-java-format/src/main/java/com/palantir/javaformat/OpenOp.javahttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-717f9db8d6426a19eefff0be2b37a821191366a71a64cc6ddbc2024deadb42bd
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/open-java-format/src/main/java/com/palantir/javaformat/OpenOp.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-717f9db8d6426a19eefff0be2b37a821191366a71a64cc6ddbc2024deadb42bd
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-717f9db8d6426a19eefff0be2b37a821191366a71a64cc6ddbc2024deadb42bd
open-java-format/src/main/java/com/palantir/javaformat/PartialInlineability.javahttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-c8d10e7202b7449d8c7a279b84c72ca20731a430f87f3a9e9b908fa87f00702c
View file https://redirect.github.com/openjavaformat/open-java-format/blob/4c647aacfe1cb43fb5d22d6f2fa0b458c765b137/open-java-format/src/main/java/com/palantir/javaformat/PartialInlineability.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/openjavaformat/open-java-format/pull/99/{{ revealButtonHref }}
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-c8d10e7202b7449d8c7a279b84c72ca20731a430f87f3a9e9b908fa87f00702c
https://redirect.github.com/openjavaformat/open-java-format/pull/99/files#diff-c8d10e7202b7449d8c7a279b84c72ca20731a430f87f3a9e9b908fa87f00702c
Please reload this pagehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/files
Please reload this pagehttps://redirect.github.com/openjavaformat/open-java-format/pull/99/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.