You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Christopher Tubbs (JIRA)" <ji...@apache.org> on 2019/08/15 21:01:00 UTC

[jira] [Commented] (THRIFT-4927) The java Library UnsupportedEncodingException is not clear

    [ https://issues.apache.org/jira/browse/THRIFT-4927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16908475#comment-16908475 ] 

Christopher Tubbs commented on THRIFT-4927:
-------------------------------------------

UTF-8 is a required encoding of all JVMs. This catch clause is irrelevant.... it can never happen.

> The java Library UnsupportedEncodingException is not clear
> ----------------------------------------------------------
>
>                 Key: THRIFT-4927
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4927
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>    Affects Versions: 0.12.0
>            Reporter: pengzhouhu
>            Priority: Minor
>
> In the TSaslTransport and TSaslClientTransport java classes,
> After the try catch UnsupportedEncodingException for the code new String(payload,"UTF-8") and getBytes("UTF-8")
> Throw new TTransportException(e);
> This exception is ambiguous and should be consistent with the processing of other classes;
> Throw new TTransportException("JVM DOES NOT SUPPORT UTF-8");
> So I took the branch and modified it.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)