[ https://issues.apache.org/jira/browse/HIVE-24903?focusedWorklogId=602689&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-602689 ]
ASF GitHub Bot logged work on HIVE-24903: ----------------------------------------- Author: ASF GitHub Bot Created on: 27/May/21 01:06 Start Date: 27/May/21 01:06 Worklog Time Spent: 10m Work Description: belugabehr commented on pull request #2127: URL: https://github.com/apache/hive/pull/2127#issuecomment-849235452 Please change title of PR and JIRA -- 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: 602689) Time Spent: 0.5h (was: 20m) > Change String.getBytes() to DFSUtil.string2Bytes(String) to avoid Unsupported > Encoding Exception > ------------------------------------------------------------------------------------------------ > > Key: HIVE-24903 > URL: https://issues.apache.org/jira/browse/HIVE-24903 > Project: Hive > Issue Type: Bug > Reporter: dbgp2021 > Priority: Major > Labels: pull-request-available > Attachments: 1.patch > > Time Spent: 0.5h > Remaining Estimate: 0h > > Hello, > I found that DFSUtil.string2Bytes(String) can be used here instead of > String.getBytes(). Otherwise, the API String.getBytes() may cause potential > risk of UnsupportedEncodingException since the behavior of this method when > the string cannot be encoded in the default charset is unspecified. One > recommended API is DFSUtil.string2Bytes(String) which provides more control > over the encoding process and can avoid this exception. -- This message was sent by Atlassian Jira (v8.3.4#803005)