[ https://issues.apache.org/jira/browse/BEAM-9453?focusedWorklogId=398516&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-398516 ]
ASF GitHub Bot logged work on BEAM-9453: ---------------------------------------- Author: ASF GitHub Bot Created on: 05/Mar/20 17:18 Start Date: 05/Mar/20 17:18 Worklog Time Spent: 10m Work Description: Hk-tang commented on issue #11017: [BEAM-9453] Fix potential UnsupportedEncodingException URL: https://github.com/apache/beam/pull/11017#issuecomment-595345916 A Jira ticket has been created and the commit message has been updated ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 398516) Time Spent: 10m > Fix potential UnsupportedEncodingException > ------------------------------------------ > > Key: BEAM-9453 > URL: https://issues.apache.org/jira/browse/BEAM-9453 > Project: Beam > Issue Type: Improvement > Components: io-java-rabbitmq > Affects Versions: 2.16.0 > Reporter: Henry Tang > Priority: Trivial > Labels: pull-request-available > Fix For: Not applicable > > Original Estimate: 0h > Time Spent: 10m > Remaining Estimate: 0h > > Currently the code assigns a new string with > {code:java} > String s = new String(bytes, "UTF-8"); > {code} > This has the possibility of throwing an UnsupportedEncodingException. > > Using > {code:java} > new String(bytes, StandardCharsets.UTF_8){code} > avoids the possibility of throwing an UnsupportedEncodingException > -- This message was sent by Atlassian Jira (v8.3.4#803005)