AryanRG opened a new pull request, #325:
URL: https://github.com/apache/commons-exec/pull/325
## Summary
`StringUtils.stringSubstitution()` reads one character beyond the input when
a literal `$` is the final character. This also breaks
`CommandLine.toStrings()` for arguments such as `end$` whenever a substitution
map is set. Preserve the trailing `$` and report an unterminated `${...`
expression with the existing missing-delimiter `IllegalArgumentException`
instead of an index exception.
Add direct strict/lenient and `CommandLine` regressions, plus a 1.7.0
release note. Jira: [EXEC-125](https://issues.apache.org/jira/browse/EXEC-125).
## Validation
- New regression tests failed against unmodified `master` and passed with
the fix.
- Local default `mvn` passed on the exact four-file commit; focused
`StringUtilTest,CommandLineTest`, Maven validation, and `git diff --check`
passed.
- Hosted CI and cross-platform results are pending.
## Contributor checklist
- [x] Read the Commons Exec contribution guidelines.
- [x] Read the ASF Generative Tooling Guidance.
- [x] AI assistance used: Kiro assisted with the code and tests and
independently reviewed the final patch; the issue-linked release note and PR
description were also prepared with AI assistance.
- [x] Run the default `mvn` build successfully.
- [x] Add behavioral regression tests that fail without the runtime fix.
- [x] Explain the problem, change, and validation in this PR.
- [x] Use a meaningful issue-linked commit subject and body.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]