urunni88 commented on code in PR #31148:
URL: https://github.com/apache/camel/pull/31148#discussion_r4749827709
##########
components/camel-aws/camel-aws2-translate/src/main/java/org/apache/camel/component/aws2/translate/Translate2Producer.java:
##########
@@ -134,10 +136,21 @@ private void translateText(TranslateClient
translateClient, Exchange exchange) t
}
request.sourceLanguageCode(source);
request.targetLanguageCode(target);
- if
(!ObjectHelper.isEmpty(exchange.getIn().getHeader(Translate2Constants.TERMINOLOGY_NAMES,
Collection.class))) {
- Collection<String> terminologies
- =
exchange.getIn().getHeader(Translate2Constants.TERMINOLOGY_NAMES,
Collection.class);
- request.terminologyNames(terminologies);
+ Object terminologyNames =
exchange.getIn().getHeader(Translate2Constants.TERMINOLOGY_NAMES);
+ if (terminologyNames != null) {
+ // one name or several names separated by commas, or a
String[] or a Collection of names
Review Comment:
Done in the latest commit: the comment now says that a String[] or a
Collection goes through the type converter.
_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]