Skip to content

Conversation

@roeniss
Copy link

@roeniss roeniss commented Jan 18, 2026

Purpose of the pull request

Closed: #462

What's changed?

Added a bounds check after the inner while loop to break out when no valid (non-escaped) closing brace is found.

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment. (in this case, no need I guess)
  • I have added the necessary unit tests and all cases have passed.

When a template placeholder contains an escaped closing brace like {foo\},
the parser would throw StringIndexOutOfBoundsException because it attempted
to use suffixIndex=-1 in a substring operation.

Added a bounds check after the inner while loop to break out when no valid
(non-escaped) closing brace is found.
@roeniss
Copy link
Author

roeniss commented Jan 18, 2026

commit force-pushed due to spotless check

@roeniss
Copy link
Author

roeniss commented Jan 25, 2026

@psxjoy could you review this?

@psxjoy psxjoy self-requested a review January 25, 2026 15:30
@psxjoy psxjoy added the PR: reviewing Currently under active review. label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: reviewing Currently under active review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] When filling the template, an exception is reported when the placeholder content is '{foo\}'

2 participants