Skip to content

[TEXT-243] Skip substituted output in StringSubstitutorReader - #782

Open
AryanRG wants to merge 1 commit into
apache:masterfrom
AryanRG:TEXT-243-substituted-output-skip
Open

AryanRG wants to merge 1 commit into
apache:masterfrom
AryanRG:TEXT-243-substituted-output-skip

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 17, 2026 •

Copy link
Copy Markdown

Jira: https://issues.apache.org/jira/browse/TEXT-243

StringSubstitutorReader.skip(long) currently advances the wrapped template reader, so its count and position disagree with the substituted output. Consume output through this reader’s read path and reject skipping after the wrapper closes. Add regression coverage for expansion, contraction, partial reads, EOF, large counts, and wrapped readers whose skip fails.

Validation: focused reader tests passed (18 new, 83 existing). The default Maven build passed on JDK 17: 2,007 tests, 0 failures/errors, 3 skips. Java 8 runtime and hosted CI were not exercised locally.

AI assistance: OpenAI Codex helped investigate, prepare the patch and tests, and review.

Consume skipped characters through the substituted reader so counts and positions reflect the output stream. Reject skip after this wrapper closes and cover expansion, contraction, EOF, and wrapped readers that cannot skip.

Generated-by: OpenAI Codex
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