TheNeuralBit commented on a change in pull request #13410:
URL: https://github.com/apache/beam/pull/13410#discussion_r553692685
##########
File path:
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/JulHandlerPrintStreamAdapterFactory.java
##########
@@ -86,7 +86,7 @@ public void write(int i) throws IOException {
this.logger = Logger.getLogger(loggerName);
this.buffer = new StringBuilder();
this.decoder =
- Charset.defaultCharset()
+ StandardCharsets.UTF_8
Review comment:
What I was suggesting is that we should add a new argument to the
private constructor and the static create() method: `Charset charset`. Then in
the constructor we'll use `charset` instead of `Charset.defaultCharset()` to
create `encoder`.
Currently the test is using `StandardCharsets.UTF_8`, but only to create the
expected outputs. It also needs to create a
`JulHandlerPrintStreamAdapterFactory` that uses `UTF_8` explicitly, so we need
a way to pass that through. I think as it is this test could still fail if the
default charset isn't UTF-8
----------------------------------------------------------------
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]