You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Xiangdong Huang (Jira)" <ji...@apache.org> on 2021/05/12 07:28:00 UTC

[jira] [Commented] (THRIFT-5412) TSocket and TEndpointTransport should not throw TTransportException

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

Xiangdong Huang commented on THRIFT-5412:
-----------------------------------------

The same issue occues in `TNonblockingSocket`

> TSocket and TEndpointTransport should not throw TTransportException
> -------------------------------------------------------------------
>
>                 Key: THRIFT-5412
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5412
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>    Affects Versions: 0.14.1
>            Reporter: Xiangdong Huang
>            Priority: Major
>
> In Thrift 0.14.1, a new TSocket constructor is provided, 
> ```
> public TSocket(TConfiguration config, String host, int port, int socketTimeout, int connectTimeout) throws TTransportException
> ```
> The method will throw an exception TTransportException.
> The exception is inherented from `TEndpointTransport.resetConsumedMessageSize()`.
> However, as the constructor calls `TEndpointTransport.resetConsumedMessageSize(-1)`, which will never throw such an exception, I think we can remove the exception declaration in TSocket's constructor.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)