urunni88 opened a new pull request, #31148: URL: https://github.com/apache/camel/pull/31148
# Description Fixes [CAMEL-27833](https://issues.apache.org/jira/browse/CAMEL-27833). `Translate2Producer.translateText` read the `CamelAwsTranslateTerminologyNames` header with `getHeader(..., Collection.class)`, so a String (one name, or `"a,b"`) converted to `null` and the header was dropped without notice. It now reads the header as: - a String: one name, or names separated by commas, trimmed - otherwise a Collection, as before, so a `String[]` and a List keep working - anything else, such as a number, fails with an `IllegalArgumentException` that names the type, instead of being dropped The header description (and the generated JSON, its catalog copy and the Endpoint DSL) no longer says that a String is ignored. Tests in `Translate2ProducerTest`, with the mock client recording the request: a comma-separated String, one name, a `String[]`, a List, and a number. Without the fix, the two String tests and the number test fail; the array and List tests pass, as those already worked. The 22 tests of the module pass. # Target - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch) # Tracking - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it). https://issues.apache.org/jira/browse/CAMEL-27833 # Apache Camel coding standards and style - [x] I checked that each commit in the pull request has a meaningful subject line and body. - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes. # AI-assisted contributions - [x] This PR was prepared with the help of Claude (Anthropic), credited with a `Co-authored-by` trailer in the commit. _Claude Code on behalf of Urmila Unni_ -- 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]
