René's URL Explorer Experiment


Title: Fix CR line tracking and block string normalization by andimarek · Pull Request #4518 · graphql-java/graphql-java · GitHub

Open Graph Title: Fix CR line tracking and block string normalization by andimarek · Pull Request #4518 · graphql-java/graphql-java

X Title: Fix CR line tracking and block string normalization by andimarek · Pull Request #4518 · graphql-java/graphql-java

Description: Standalone carriage returns did not advance the lexer's line counter, so AST nodes and errors after a CR were reported on the previous line. For example, parsing { f(arg: "😀")\r ) } reported line 1, column 16; it now reports line 2, column 2. This change applies the GraphQL Line Terminators rules throughout parsing: Count standalone CR and LF as line breaks, and count CRLF once, including after comments and within block strings. The lexer tracks positions directly, preserving the original source characters and ignored-character captures. Split block-string values on CR, LF, or CRLF before removing indentation and joining lines with LF. Previously, CR could remain in the resulting value and interfere with indentation and blank-line processing. Reject U+2028 and U+2029 between tokens. They remain valid content inside strings and comments. Added 32 Spock regression cases covering AST and error locations, code-point columns after emoji, comments, EOF, validation errors, multiple sources, mixed line endings, reader-buffer boundaries, block-string values, and captured whitespace. Thirteen cases failed before the fix. Updated the existing ignored-character test to expect the corrected positions after CR, and restored the JVM-wide parser options after the existing options test to prevent it from affecting later tests. Added explicit ignored-character capture tests for 43 AST node types, checking exact surrounding spaces, tabs, commas, CR, LF, and CRLF when capture is enabled and empty captures when disabled. These tests use per-parse options. This preserves coverage after fixing the global-options leak: the master baseline had exercised 33 builders only because an earlier test left capture enabled for later tests. The coverage baseline is unchanged. Validation: Full Java 25 test suites and coverage: ./gradlew test testng jacocoTestReport (excluding two uncommitted local Unicode investigation tests). All 32 newline regression cases and 43 ignored-character capture cases pass. Java 25: 6,071 passed, 57 skipped, zero failures across Spock and TestNG. The unchanged per-class coverage gate reports zero regressions across 992 classes. Covered lines: 30,226 versus 30,210 on master; covered methods: 8,080 versus 8,074. git diff --check and the repository's pre-commit file checks pass.

Open Graph Description: Standalone carriage returns did not advance the lexer's line counter, so AST nodes and errors after a CR were reported on the previous line. For example, parsing { f(arg: "😀")\r ) } r...

X Description: Standalone carriage returns did not advance the lexer's line counter, so AST nodes and errors after a CR were reported on the previous line. For example, parsing { f(arg: "😀&qu...

Opengraph URL: https://github.com/graphql-java/graphql-java/pull/4518

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:0b1f8f41-90df-f003-56d7-1d35ee8ba5b9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8B66:17FB7:1AB5A51:21D1C12:6B0188E9
html-safe-nonce0c1dc7efb18d639bf5e4bfd5693df11ec61cb4fd8215597c74a35d568b2060f7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjY2OjE3RkI3OjFBQjVBNTE6MjFEMUMxMjo2QjAxODhFOSIsInZpc2l0b3JfaWQiOiI3NTIxMjY3OTczNzM1MTU1OTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7bb2dab0f196200064c3238119a9e0438bada3081786c047748d089c28f7616d
hovercard-subject-tagpull_request:5079200802
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/graphql-java/graphql-java/pull/4518/files
twitter:imagehttps://avatars.githubusercontent.com/u/1706744?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1706744?s=400&v=4
og:image:altStandalone carriage returns did not advance the lexer's line counter, so AST nodes and errors after a CR were reported on the previous line. For example, parsing { f(arg: "😀")\r ) } r...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id38602457
octolytics-dimension-repository_nwographql-java/graphql-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38602457
octolytics-dimension-repository_network_root_nwographql-java/graphql-java
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/pull/4518/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F4518%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%2Fgraphql-java%2Fgraphql-java%2Fpull%2F4518%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=graphql-java%2Fgraphql-java
Reloadhttps://github.com/graphql-java/graphql-java/pull/4518/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4518/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4518/files
graphql-javahttps://github.com/graphql-java
graphql-javahttps://github.com/graphql-java/graphql-java
Codehttps://github.com/graphql-java/graphql-java
Issues27 (27)https://github.com/graphql-java/graphql-java/issues
Pull requests35 (35)https://github.com/graphql-java/graphql-java/pulls
Discussionshttps://github.com/graphql-java/graphql-java/discussions
Actionshttps://github.com/graphql-java/graphql-java/actions
Projectshttps://github.com/graphql-java/graphql-java/projects
Wikihttps://github.com/graphql-java/graphql-java/wiki
Security and qualityhttps://github.com/graphql-java/graphql-java/security
Insightshttps://github.com/graphql-java/graphql-java/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgraphql-java%2Fgraphql-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java%2Fissues%2Fnew%2Fchoose
andimarekhttps://github.com/andimarek
masterhttps://github.com/graphql-java/graphql-java/tree/master
codex/fix-parser-line-terminatorshttps://github.com/graphql-java/graphql-java/tree/codex/fix-parser-line-terminators
Conversation 1 https://github.com/graphql-java/graphql-java/pull/4518
Commits 3 https://github.com/graphql-java/graphql-java/pull/4518/commits
Checks 11 https://github.com/graphql-java/graphql-java/pull/4518/checks
Files changed https://github.com/graphql-java/graphql-java/pull/4518/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4518/files
Fix CR line tracking and block string normalization https://github.com/graphql-java/graphql-java/pull/4518/files#top
Show all changes 3 commits https://github.com/graphql-java/graphql-java/pull/4518/files
434682a Fix CR line tracking and block string normalization andimarek Oct 30, 2026 https://github.com/graphql-java/graphql-java/pull/4518/commits/434682a55e9e62f4b30e200ded3c7faef9fd01a8
841e0f7 Test ignored-character capture independently of global parser options andimarek Oct 30, 2026 https://github.com/graphql-java/graphql-java/pull/4518/commits/841e0f7fa42b4b1c999f1e4feb5a8e96e6b913b8
252929f Merge remote-tracking branch 'origin/master' into codex/fix-parser-li… andimarek Nov 12, 2026 https://github.com/graphql-java/graphql-java/pull/4518/commits/252929f750d19d29057cc933fbc2d969addab0d7
Clear filters https://github.com/graphql-java/graphql-java/pull/4518/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4518/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4518/files
GraphqlCommon.g4 https://github.com/graphql-java/graphql-java/pull/4518/files#diff-00f431f0386a21fe1249cf98b8722bf66c6f8df043c65136246d157ee5d64cc1
GraphqlLexerATNSimulator.java https://github.com/graphql-java/graphql-java/pull/4518/files#diff-5fa66e90eae33900c1b9cc40d090c11ce63a18e45d5786a570c3b02a3604d31b
Parser.java https://github.com/graphql-java/graphql-java/pull/4518/files#diff-24ba77f7c181cfd66deb300610d9d36d8ad43a42defd2d8d899da88a8c77f989
StringValueParsing.java https://github.com/graphql-java/graphql-java/pull/4518/files#diff-ecfd9d90862d1faaaafb7c361cc2f006ff12f6e15361e09c4581db894577cf96
IgnoredCharactersTest.groovy https://github.com/graphql-java/graphql-java/pull/4518/files#diff-904e95d19bc9996e4dc4c1805a120cdd0ded0e651f7e3e04dd3474f874c1c5d2
LineTerminatorTest.groovy https://github.com/graphql-java/graphql-java/pull/4518/files#diff-bd4d2a0d29170e0145b4ec4d24b2732b693bcad6d37ed18e175f409ee3e16801
ParserTest.groovy https://github.com/graphql-java/graphql-java/pull/4518/files#diff-1e99797c8854c50d5995fb32cd36c6c0d3cee97c1f5fb4350d2a0e7e1053a67b
src/main/antlr/GraphqlCommon.g4https://github.com/graphql-java/graphql-java/pull/4518/files#diff-00f431f0386a21fe1249cf98b8722bf66c6f8df043c65136246d157ee5d64cc1
View file https://github.com/graphql-java/graphql-java/blob/252929f750d19d29057cc933fbc2d969addab0d7/src/main/antlr/GraphqlCommon.g4
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4518/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-00f431f0386a21fe1249cf98b8722bf66c6f8df043c65136246d157ee5d64cc1
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-00f431f0386a21fe1249cf98b8722bf66c6f8df043c65136246d157ee5d64cc1
src/main/java/graphql/parser/GraphqlLexerATNSimulator.javahttps://github.com/graphql-java/graphql-java/pull/4518/files#diff-5fa66e90eae33900c1b9cc40d090c11ce63a18e45d5786a570c3b02a3604d31b
View file https://github.com/graphql-java/graphql-java/blob/252929f750d19d29057cc933fbc2d969addab0d7/src/main/java/graphql/parser/GraphqlLexerATNSimulator.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4518/{{ revealButtonHref }}
src/main/java/graphql/parser/Parser.javahttps://github.com/graphql-java/graphql-java/pull/4518/files#diff-24ba77f7c181cfd66deb300610d9d36d8ad43a42defd2d8d899da88a8c77f989
View file https://github.com/graphql-java/graphql-java/blob/252929f750d19d29057cc933fbc2d969addab0d7/src/main/java/graphql/parser/Parser.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4518/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-24ba77f7c181cfd66deb300610d9d36d8ad43a42defd2d8d899da88a8c77f989
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-24ba77f7c181cfd66deb300610d9d36d8ad43a42defd2d8d899da88a8c77f989
src/main/java/graphql/parser/StringValueParsing.javahttps://github.com/graphql-java/graphql-java/pull/4518/files#diff-ecfd9d90862d1faaaafb7c361cc2f006ff12f6e15361e09c4581db894577cf96
View file https://github.com/graphql-java/graphql-java/blob/252929f750d19d29057cc933fbc2d969addab0d7/src/main/java/graphql/parser/StringValueParsing.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4518/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-ecfd9d90862d1faaaafb7c361cc2f006ff12f6e15361e09c4581db894577cf96
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-ecfd9d90862d1faaaafb7c361cc2f006ff12f6e15361e09c4581db894577cf96
https://github.com/graphql-java/graphql-java/pull/4518/files#diff-ecfd9d90862d1faaaafb7c361cc2f006ff12f6e15361e09c4581db894577cf96
src/test/groovy/graphql/parser/IgnoredCharactersTest.groovyhttps://github.com/graphql-java/graphql-java/pull/4518/files#diff-904e95d19bc9996e4dc4c1805a120cdd0ded0e651f7e3e04dd3474f874c1c5d2
View file https://github.com/graphql-java/graphql-java/blob/252929f750d19d29057cc933fbc2d969addab0d7/src/test/groovy/graphql/parser/IgnoredCharactersTest.groovy
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4518/{{ revealButtonHref }}
src/test/groovy/graphql/parser/LineTerminatorTest.groovyhttps://github.com/graphql-java/graphql-java/pull/4518/files#diff-bd4d2a0d29170e0145b4ec4d24b2732b693bcad6d37ed18e175f409ee3e16801
View file https://github.com/graphql-java/graphql-java/blob/252929f750d19d29057cc933fbc2d969addab0d7/src/test/groovy/graphql/parser/LineTerminatorTest.groovy
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4518/{{ revealButtonHref }}
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4518/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4518/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.