[
https://issues.apache.org/jira/browse/HADOOP-17605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042345#comment-18042345
]
ASF GitHub Bot commented on HADOOP-17605:
-----------------------------------------
github-actions[bot] commented on PR #2822:
URL: https://github.com/apache/hadoop/pull/2822#issuecomment-3604493768
We're closing this stale PR because it has been open for 100 days with no
activity. This isn't a judgement on the merit of the PR in any way. It's just a
way of keeping the PR queue manageable.
If you feel like this was a mistake, or you would like to continue working
on it, please feel free to re-open it and ask for a committer to remove the
stale tag and review again.
Thanks all for your contribution.
> Change String.getBytes() to DFSUtil.string2Bytes(String) to avoid Unsupported
> Encoding Exception
> ------------------------------------------------------------------------------------------------
>
> Key: HADOOP-17605
> URL: https://issues.apache.org/jira/browse/HADOOP-17605
> Project: Hadoop Common
> Issue Type: Improvement
> 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.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]