René's URL Explorer Experiment


Title: test: fail the build when TablesNamesFinder misses a visitor dispatch method by fudianchn · Pull Request #2538 · JSQLParser/JSqlParser · GitHub

Open Graph Title: test: fail the build when TablesNamesFinder misses a visitor dispatch method by fudianchn · Pull Request #2538 · JSQLParser/JSqlParser

X Title: test: fail the build when TablesNamesFinder misses a visitor dispatch method by fudianchn · Pull Request #2538 · JSQLParser/JSqlParser

Description: AI disclosure: this change was prepared with AI coding agents, reviewed and revised line by line by me. What Adds TablesNamesFinderCompletenessTest: it fails the build when a visitor interface declared by TablesNamesFinder gains a dispatch method visit(Node, context) that is not implemented in the TablesNamesFinder class hierarchy (it resolves to an interface default instead). Why TablesNamesFinder dispatches through 8 visitor interfaces. Most visit(Node, context) methods are abstract, so a missing implementation fails compilation. But the interfaces progressively gain default methods (SelectVisitor#visit(PivotQuery, context) returns null, ExpressionVisitor#visit(GroupByElement, context) traverses), and for a default declared by a single interface a missing implementation compiles silently and loses the tables of that node type without any test failing. Demonstrated on master by mutation: turning StatementVisitor#visit(Analyze, context) into a return null default and dropping the finder override compiles, keeps the whole test suite green (no existing test collects tables from ANALYZE), and findTables("ANALYZE mytab") silently returns []. After #2479 and #2517 the finder implements all 214 dispatch methods; this test pins that state for the interfaces it declares. How Enumerates the declared visitor interfaces and their visit(Node, context) methods by reflection and asserts each resolves to an implementation in the TablesNamesFinder class hierarchy (not to an interface default); interfaces declared later are covered automatically. Dispatch helpers carrying a java.util collection (e.g. MergeOperationVisitor#visit(Collection, context)) are skipped: bulk dispatch, not an AST node. INHERITED_DISPATCH_NODES documents the deliberate exception: ExpressionVisitor's visit(GroupByElement, context) default already forwards the group-by expressions and the grouping sets, the finder relies on it from visit(PlainSelect). The walk guards itself against becoming vacuous: it fails when a declared interface exposes no guarded dispatch method at all (filters too narrow) and when the finder stops declaring one of the 8 visitor families. Testing New test TablesNamesFinderCompletenessTest#testImplementsEveryDispatchMethodOfEveryDeclaredVisitorInterface: green on master (214 dispatch methods verified). Mutation 1 (visit(Analyze, context) turned into a default + finder override dropped): findTables("ANALYZE mytab") returns [], the existing suite stays green, the new test fails naming StatementVisitor#visit(Analyze, context). Mutation 2 (allowlist entry removed): the test fails naming ExpressionVisitor#visit(GroupByElement, context), the allowlist is load-bearing. Mutation 3 (collection filter removed): the test fails naming MergeOperationVisitor#visit(Collection, context), the filter is load-bearing. Mutation 4 (walk matches no dispatch method): the test fails through the vacuousness assertion naming all declared interfaces, the guard cannot silently degrade to always-green. 本地验证:./gradlew check(5081 tests, 0 failures)。 未覆盖的边界/风险:interface-level gaps only. Empty-shell implementations (an override that visits nothing, the #2478 shape) and visitor families the finder does not declare at all are not detected: both remain manual review duties. Methods declared by two interfaces at once (e.g. visit(PivotQuery, context)) are compiler-enforced through the unrelated-defaults rule and only belt-and-braces here.

Open Graph Description: AI disclosure: this change was prepared with AI coding agents, reviewed and revised line by line by me. What Adds TablesNamesFinderCompletenessTest: it fails the build when a visitor interface decl...

X Description: AI disclosure: this change was prepared with AI coding agents, reviewed and revised line by line by me. What Adds TablesNamesFinderCompletenessTest: it fails the build when a visitor interface decl...

Opengraph URL: https://github.com/JSQLParser/JSqlParser/pull/2538

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4

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:7d9e0d1e-5912-ca1a-2042-258fe1f06556
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAB14:32A711:446928:5E39CF:6B049D6D
html-safe-noncefc5b87660425a9bbd434996d8e3b6d6fc36e6674ae80df523dcb15440036d7e8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjE0OjMyQTcxMTo0NDY5Mjg6NUUzOUNGOjZCMDQ5RDZEIiwidmlzaXRvcl9pZCI6IjU5ODY3NzEwNDc1ODcwMjgzMzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6b9561dcc5d77436ea2f019febfad31bab084efff00acc38fdcf585b4c6bb137
hovercard-subject-tagpull_request:4432962801
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/JSQLParser/JSqlParser/pull/2538/files
twitter:imagehttps://avatars.githubusercontent.com/u/40510713?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40510713?s=400&v=4
og:image:altAI disclosure: this change was prepared with AI coding agents, reviewed and revised line by line by me. What Adds TablesNamesFinderCompletenessTest: it fails the build when a visitor interface decl...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git
octolytics-dimension-user_id4643847
octolytics-dimension-user_loginJSQLParser
octolytics-dimension-repository_id1944709
octolytics-dimension-repository_nwoJSQLParser/JSqlParser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1944709
octolytics-dimension-repository_network_root_nwoJSQLParser/JSqlParser
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3fd14143b75b2af7b76bbd23b069867d091adfcc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSQLParser/JSqlParser/pull/2538/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2538%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%2FJSQLParser%2FJSqlParser%2Fpull%2F2538%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=JSQLParser%2FJSqlParser
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2538/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2538/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2538/files
JSQLParserhttps://github.com/JSQLParser
JSqlParserhttps://github.com/JSQLParser/JSqlParser
Codehttps://github.com/JSQLParser/JSqlParser
Issues2 (2)https://github.com/JSQLParser/JSqlParser/issues
Pull requests2 (2)https://github.com/JSQLParser/JSqlParser/pulls
Discussionshttps://github.com/JSQLParser/JSqlParser/discussions
Actionshttps://github.com/JSQLParser/JSqlParser/actions
Projectshttps://github.com/JSQLParser/JSqlParser/projects
Wikihttps://github.com/JSQLParser/JSqlParser/wiki
Security and qualityhttps://github.com/JSQLParser/JSqlParser/security
Insightshttps://github.com/JSQLParser/JSqlParser/insights
Sign up for GitHub https://github.com/signup?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
manticore-projectshttps://github.com/manticore-projects
JSQLParser:masterhttps://github.com/JSQLParser/JSqlParser/tree/master
fudianchn:guard/finders-interface-completenesshttps://github.com/fudianchn/JSqlParser/tree/guard/finders-interface-completeness
Conversation 1 https://github.com/JSQLParser/JSqlParser/pull/2538
Commits 1 https://github.com/JSQLParser/JSqlParser/pull/2538/commits
Checks 7 https://github.com/JSQLParser/JSqlParser/pull/2538/checks
Files changed https://github.com/JSQLParser/JSqlParser/pull/2538/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2538/files
test: fail the build when TablesNamesFinder misses a visitor dispatch method https://github.com/JSQLParser/JSqlParser/pull/2538/files#top
Show all changes 1 commit https://github.com/JSQLParser/JSqlParser/pull/2538/files
02b17ec test: fail the build when TablesNamesFinder misses a visitor dispatch… fudianchn Sep 3, 2026 https://github.com/JSQLParser/JSqlParser/pull/2538/commits/02b17ecc8b1674e522c99a289f4a01b280770ef7
Clear filters https://github.com/JSQLParser/JSqlParser/pull/2538/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2538/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2538/files
src/test/java/net/sf/jsqlparser/util/TablesNamesFinderCompletenessTest.javahttps://github.com/JSQLParser/JSqlParser/pull/2538/files#diff-75ded6bf97cddbbc01c830b38338561cd66de19aca35be9bdd9b799427ea84e1
View file https://github.com/fudianchn/JSqlParser/blob/02b17ecc8b1674e522c99a289f4a01b280770ef7/src/test/java/net/sf/jsqlparser/util/TablesNamesFinderCompletenessTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JSQLParser/JSqlParser/pull/2538/{{ revealButtonHref }}
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2538/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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.