[
https://issues.apache.org/jira/browse/BEAM-11327?focusedWorklogId=532793&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-532793
]
ASF GitHub Bot logged work on BEAM-11327:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Jan/21 01:07
Start Date: 08/Jan/21 01:07
Worklog Time Spent: 10m
Work Description: omarismail94 commented on a change in pull request
#13410:
URL: https://github.com/apache/beam/pull/13410#discussion_r553682842
##########
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:
> How about this - we can make this class (the private constructor and the
create() method below) parameterized by Charset.
The variables that are passed in do not use any of the `Charset` methods
though right?
>The places where its used as the default System.out/System.err in the
Dataflow worker can pass in Charset.defaultCharset(), but the test can pass in
Charsets.UTF_8
The test file has `StandardCharsets.UTF_8` replacing
`Charset.defaultCharset()`.
Let me know if I am missing something @TheNeuralBit !
##########
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:
> How about this - we can make this class (the private constructor and
the create() method below) parameterized by Charset.
The variables that are passed in do not use any of the `Charset` methods
though right?
>The places where its used as the default System.out/System.err in the
Dataflow worker can pass in Charset.defaultCharset(), but the test can pass in
Charsets.UTF_8
The test file has `StandardCharsets.UTF_8` replacing
`Charset.defaultCharset()`.
Let me know if I am missing something @TheNeuralBit !
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 532793)
Time Spent: 5h 50m (was: 5h 40m)
> Replace Charset.defaultCharset() with StandardCharsets.UTF_8
> ------------------------------------------------------------
>
> Key: BEAM-11327
> URL: https://issues.apache.org/jira/browse/BEAM-11327
> Project: Beam
> Issue Type: Bug
> Components: test-failures
> Reporter: Omar Ismail
> Assignee: Omar Ismail
> Priority: P2
> Time Spent: 5h 50m
> Remaining Estimate: 0h
>
> When running tests where `getBytes(Charset.defaultCharset())` is called, and
> `locale` is not set to "UTF8", the test fails.
>
> I am going to replace all mentions of `Charset.defaultCharset()` to
> `StandardCharsets.UTF_8` so testing is not affected my computer settings.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)