justinleet 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_r312477119
 
 

 ##########
 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:
   This needs to be the underlying parser charset, I think. Otherwise we'll be 
trying to decode with the wrong thing and not outputting the message in a 
useful manner.
   
   This seems like it occurs a couple times in these messages, so make sure I'm 
not misinterpreting it.

----------------------------------------------------------------
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

Reply via email to