mmiklavc commented on a change in pull request #1341: METRON-614: Eliminate use
of the default Charset
URL: https://github.com/apache/metron/pull/1341#discussion_r313050130
##########
File path:
metron-platform/metron-parsing/metron-parsers-common/src/main/java/org/apache/metron/parsers/json/JSONMapParser.java
##########
@@ -202,7 +204,7 @@ public void init() {
}
return Collections.unmodifiableList(parsedMessages);
} catch (Throwable e) {
- String message = "Unable to parse " + new String(rawMessage) + ": " +
e.getMessage();
+ String message = "Unable to parse " + new String(rawMessage,
StandardCharsets.UTF_8) + ": " + e.getMessage();
Review comment:
I need to look into this a bit more. You're correct, that should be the
readCharset also. I may be missing something, but our parser configure(...)
method doesn't seem to get the high level parser configuration detail, e.g. all
the options noted here that are siblings of the `parserConfig` key -
https://github.com/apache/metron/tree/master/metron-platform/metron-parsing#parser-configuration.
It seems better to make this option general - sibling to `parserConfig` rather
than within `parserConfig`, but I don't think the API will allow it in its
current form.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services