ChrisSamo632 commented on a change in pull request #5193:
URL: https://github.com/apache/nifi/pull/5193#discussion_r676402146
##########
File path:
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-restapi-processors/src/main/java/org/apache/nifi/processors/elasticsearch/ElasticsearchRestProcessor.java
##########
@@ -111,11 +112,11 @@ default String getQuery(FlowFile input, ProcessContext
context, ProcessSession s
if (context.getProperty(QUERY).isSet()) {
retVal =
context.getProperty(QUERY).evaluateAttributeExpressions(input).getValue();
} else if (input != null) {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
+ final ByteArrayOutputStream out = new ByteArrayOutputStream();
session.exportTo(input, out);
out.close();
- retVal = new String(out.toByteArray());
+ retVal = out.toString();
Review comment:
I considered this but wasn't sure whether it's best to leave it using
the system default (in case someone is using a non-UTF8 Charset) - maybe the
best thing really would be to allow users to specify an output (and input?)
Charset, but that seems like it should be a separate Jira/PR
I'll look again at this and consider whether UTF8 here would make sense for
now
--
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]