René's URL Explorer Experiment


Title: Format a class body that holds nothing but semicolons by abashev · Pull Request #68 · openjavaformat/open-java-format · GitHub

Open Graph Title: Format a class body that holds nothing but semicolons by abashev · Pull Request #68 · openjavaformat/open-java-format

X Title: Format a class body that holds nothing but semicolons by abashev · Pull Request #68 · openjavaformat/open-java-format

Description: Brings over google/google-java-format#1104, a fix from google-java-format 1.23. The bug class A { ; } failed with error: expected token: ';'; generated } instead. javac drops a stray semicolon from the member list, so the body looked empty and the formatter wrote {} without ever emitting the ; that was still in the input. A semicolon between real members was already handled; only a body with no member at all lost it. The same happened to interface B { ; }, record R(int a) { ; }, @interface H { ; } and new Object() { ; }. From upstream, with the author kept google/google-java-format#1104 by Liam Miller-Cushon, commit authored by them. An empty body whose next token is ; writes those semicolons one per line at the member indent before the closing brace, as the member list does. The upstream golden SemicolonInClass comes with it, with the expected output in this project's style. Added here The golden ojf-semicolon-only-body: an interface, an enum, a record, an annotation type and an anonymous class with only semicolons in the body, two semicolons in a row, a comment after the opening brace, and a semicolon in front of a real member, which took the existing path all along. Checked Both goldens fail on main and pass with the change; the output is stable on a second run. ./gradlew :open-java-format:test on JDK 21: 1505 tests, all green. The 15,747 files of the JDK 21 sources format exactly as before.

Open Graph Description: Brings over google/google-java-format#1104, a fix from google-java-format 1.23. The bug class A { ; } failed with error: expected token: ';'; generated } instead. javac drops a stray semico...

X Description: Brings over google/google-java-format#1104, a fix from google-java-format 1.23. The bug class A { ; } failed with error: expected token: ';'; generated } instead. javac drops a stra...

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

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:46b19e62-5e1c-849e-5af7-3fa191fac3f3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9DD4:23A0F:5D3F5C:7BAD23:6AFBC676
html-safe-nonce25303dc8d007a764753fc2d31b853c655db04f41844fc7ce442949d7c59ab5ec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REQ0OjIzQTBGOjVEM0Y1Qzo3QkFEMjM6NkFGQkM2NzYiLCJ2aXNpdG9yX2lkIjoiNzQxODQyNTYxMzE5MjI1MDk5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfb9c59579efaa95f7e67849436ffbae5d4e640e75e4a4237a72be5733ad55192
hovercard-subject-tagpull_request:4630478174
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/68/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:altBrings over google/google-java-format#1104, a fix from google-java-format 1.23. The bug class A { ; } failed with error: expected token: ';'; generated } instead. javac drops a stray semico...
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/68/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fopenjavaformat%2Fopen-java-format%2Fpull%2F68%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%2F68%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/68/files
Reloadhttps://github.com/openjavaformat/open-java-format/pull/68/files
Reloadhttps://github.com/openjavaformat/open-java-format/pull/68/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
semicolon-only-class-bodyhttps://github.com/openjavaformat/open-java-format/tree/semicolon-only-class-body
Conversation 0 https://github.com/openjavaformat/open-java-format/pull/68
Commits 2 https://github.com/openjavaformat/open-java-format/pull/68/commits
Checks 15 https://github.com/openjavaformat/open-java-format/pull/68/checks
Files changed https://github.com/openjavaformat/open-java-format/pull/68/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/68/files
Format a class body that holds nothing but semicolons https://github.com/openjavaformat/open-java-format/pull/68/files#top
Show all changes 2 commits https://github.com/openjavaformat/open-java-format/pull/68/files
a1b84fb Format a class body that holds nothing but semicolons cushon Sep 24, 2026 https://github.com/openjavaformat/open-java-format/pull/68/commits/a1b84fbc7559778a5f8fba4b0817b51602494f45
956f1d8 Cover the other bodies that can hold only semicolons abashev Sep 24, 2026 https://github.com/openjavaformat/open-java-format/pull/68/commits/956f1d804858a54858471766191146d00e9e46eb
Clear filters https://github.com/openjavaformat/open-java-format/pull/68/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/68/files
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/68/files
JavaInputAstVisitor.java https://github.com/openjavaformat/open-java-format/pull/68/files#diff-4c56c3f402a5387ffa98b467fa35d91986b454b87e4a1b47b11da48e30272fc3
SemicolonInClass.input https://github.com/openjavaformat/open-java-format/pull/68/files#diff-9a04607719128a4a590ab679a0a8e2734cb18dcd1d711b1dcb50bb5722dfc1a6
SemicolonInClass.output https://github.com/openjavaformat/open-java-format/pull/68/files#diff-220d6173cd7c31a949a0a652ccb965aae23469eef094e9dd4a7e7e5f262a5adb
ojf-semicolon-only-body.input https://github.com/openjavaformat/open-java-format/pull/68/files#diff-5b3838a3b34b77d0580291801390ae64a22165e50ff0fb55af8cba0a3c13d0f3
ojf-semicolon-only-body.output https://github.com/openjavaformat/open-java-format/pull/68/files#diff-dcb29467bbde39e787dd4ee91040a15c1cd7f0386527a5a67b16a0d14dff4876
open-java-format/src/main/java/com/palantir/javaformat/java/JavaInputAstVisitor.javahttps://github.com/openjavaformat/open-java-format/pull/68/files#diff-4c56c3f402a5387ffa98b467fa35d91986b454b87e4a1b47b11da48e30272fc3
View file https://github.com/openjavaformat/open-java-format/blob/956f1d804858a54858471766191146d00e9e46eb/open-java-format/src/main/java/com/palantir/javaformat/java/JavaInputAstVisitor.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/68/{{ revealButtonHref }}
https://github.com/openjavaformat/open-java-format/pull/68/files#diff-4c56c3f402a5387ffa98b467fa35d91986b454b87e4a1b47b11da48e30272fc3
https://github.com/openjavaformat/open-java-format/pull/68/files#diff-4c56c3f402a5387ffa98b467fa35d91986b454b87e4a1b47b11da48e30272fc3
...va-format/src/test/resources/com/palantir/javaformat/java/testdata/SemicolonInClass.inputhttps://github.com/openjavaformat/open-java-format/pull/68/files#diff-9a04607719128a4a590ab679a0a8e2734cb18dcd1d711b1dcb50bb5722dfc1a6
View file https://github.com/openjavaformat/open-java-format/blob/956f1d804858a54858471766191146d00e9e46eb/open-java-format/src/test/resources/com/palantir/javaformat/java/testdata/SemicolonInClass.input
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/68/{{ revealButtonHref }}
...a-format/src/test/resources/com/palantir/javaformat/java/testdata/SemicolonInClass.outputhttps://github.com/openjavaformat/open-java-format/pull/68/files#diff-220d6173cd7c31a949a0a652ccb965aae23469eef094e9dd4a7e7e5f262a5adb
View file https://github.com/openjavaformat/open-java-format/blob/956f1d804858a54858471766191146d00e9e46eb/open-java-format/src/test/resources/com/palantir/javaformat/java/testdata/SemicolonInClass.output
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/68/{{ revealButtonHref }}
...at/src/test/resources/com/palantir/javaformat/java/testdata/ojf-semicolon-only-body.inputhttps://github.com/openjavaformat/open-java-format/pull/68/files#diff-5b3838a3b34b77d0580291801390ae64a22165e50ff0fb55af8cba0a3c13d0f3
View file https://github.com/openjavaformat/open-java-format/blob/956f1d804858a54858471766191146d00e9e46eb/open-java-format/src/test/resources/com/palantir/javaformat/java/testdata/ojf-semicolon-only-body.input
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/68/{{ revealButtonHref }}
...t/src/test/resources/com/palantir/javaformat/java/testdata/ojf-semicolon-only-body.outputhttps://github.com/openjavaformat/open-java-format/pull/68/files#diff-dcb29467bbde39e787dd4ee91040a15c1cd7f0386527a5a67b16a0d14dff4876
View file https://github.com/openjavaformat/open-java-format/blob/956f1d804858a54858471766191146d00e9e46eb/open-java-format/src/test/resources/com/palantir/javaformat/java/testdata/ojf-semicolon-only-body.output
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/openjavaformat/open-java-format/pull/68/{{ revealButtonHref }}
Please reload this pagehttps://github.com/openjavaformat/open-java-format/pull/68/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.