davsclaus opened a new pull request, #27027:
URL: https://github.com/apache/camel/pull/27027
## Summary
`StringQuoteHelper.splitSafeQuote` with `trim=true` kept the spaces inside a
quoted value when it was the only or the last value, but trimmed them when a
separator followed:
```
splitSafeQuote("' a ', ' b '", ',', true, false) -> ["a", " b "] (before)
-> [" a ", " b "] (after)
```
The quoted part of each value is now tracked, and trim only removes the
spaces outside the quotes, for every value.
Affected callers: simple functions taking a list of values (such as
`${list(...)}`), `camel-exec` argument parsing, and `camel-sql` IN query values.
`ExecParseUtilsTest.testWhitespaceSeparatedArgsWithSpaces` (from 2010)
expected `"arg 0 "` to become `arg 0`; it now keeps the trailing space, as a
shell does. There is a note in the 4.23 upgrade guide.
JIRA: https://issues.apache.org/jira/browse/CAMEL-25121
## Test plan
- [x] New `StringQuoteHelperTest.testSplitTrimKeepsSpacesInsideQuotes` fails
without the fix
- [x] camel-util and camel-exec test suites pass
- [x] camel-sql (289 tests) and camel-attachments test suites pass
- [x] camel-core simple, bean and quote helper tests pass (1024 tests)
_Claude Code on behalf of Claus Ibsen_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]