[
https://issues.apache.org/jira/browse/BEAM-11327?focusedWorklogId=529572&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-529572
]
ASF GitHub Bot logged work on BEAM-11327:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Dec/20 17:28
Start Date: 30/Dec/20 17:28
Worklog Time Spent: 10m
Work Description: TheNeuralBit commented on pull request #13410:
URL: https://github.com/apache/beam/pull/13410#issuecomment-752698729
> I don't know how checkstyle works, but I can try to figure it out!
If you have the bandwidth it would be great to do it as part of this PR! It
could be left as a follow-up if you don't though.
We'd probably want to add another entry like this one, but with a regex for
`Charset.defaultCharset()`:
https://github.com/apache/beam/blob/245cf2b8ccdca6b66269b4e473c1a8903631cb3f/sdks/java/build-tools/src/main/resources/beam/checkstyle.xml#L114-L120
You can test it out locally by running `./gradlew checkstyleMain
checkstyleTest`
Since there are some rare cases where we need the default charset we'll need
to be able to suppress the check. Based on
https://stackoverflow.com/questions/27688426/ignoring-of-checkstyle-warnings-with-annotation-suppresswarnings
it looks like this can be done with `@SuppressWarnings`
----------------------------------------------------------------
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: 529572)
Time Spent: 2h 50m (was: 2h 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: 2h 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)