[ 
https://issues.apache.org/jira/browse/BEAM-11327?focusedWorklogId=531698&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-531698
 ]

ASF GitHub Bot logged work on BEAM-11327:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Jan/21 05:24
            Start Date: 06/Jan/21 05:24
    Worklog Time Spent: 10m 
      Work Description: omarismail94 commented on a change in pull request 
#13410:
URL: https://github.com/apache/beam/pull/13410#discussion_r552375009



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/JulHandlerPrintStreamAdapterFactory.java
##########
@@ -69,6 +69,9 @@
     private int carryOverBytes;
     private byte[] carryOverByteArray;
 
+    @SuppressWarnings({
+      "unchecked" // [BEAM-11327] Replace Charset.defaultCharset() with 
StandardCharsets.UTF_8

Review comment:
       Aaaah, I finally found out what causes that. `checkstyleMain.enabled` is 
set to `false` in the 
[build.gradle](https://github.com/apache/beam/blob/master/runners/google-cloud-dataflow-java/worker/build.gradle#L118)
 for the worker project. I set it to `true`, then removed the 
SuppressionWarning, and when I run `checkstyleMain`, I can see the rule gets 
triggered. I also didn't know you can set the ID used as the label in, 
`SuppressionWarnings`, so I fixed that as well! 
   
   
   If you want to test, I think if you set the flag to `true` in the 
build.gradle file, and remove the SuppressionWarning, then run the check, it 
_should_ work




----------------------------------------------------------------
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: 531698)
    Time Spent: 5.5h  (was: 5h 20m)

> 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: 5.5h
>  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)

Reply via email to