Skip to content

Fix parseStatements failure propagation and executor cleanup - #2568

Open
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/parse-statements-failure
Open

Fix parseStatements failure propagation and executor cleanup#2568
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/parse-statements-failure

Conversation

@minleejae

@minleejae minleejae commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

parseStatements("SELECT FROM", parser -> parser.withAllowComplexParsing(false)) currently returns null after a parse failure. The same happens when the configured nesting limit prevents the complex retry, including a swallowed timeout exception.

Return each successful parse directly and rethrow the original JSQLParserException when retry is unavailable. Wrap the convenience overload's internally created executor in try/finally so failure also shuts it down. Caller-owned executors remain open; null/empty-input behavior and unsupported-statement recovery are preserved.

Validation:

  • Full Gradle check and Maven verify.
  • Regression tests for disabled complex parsing, nesting limits, deterministic timeout, caller-executor reuse, empty input and unsupported-statement fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant