[
https://issues.apache.org/jira/browse/THRIFT-4725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
BELUGA BEHR updated THRIFT-4725:
--------------------------------
Description:
The method signature of {{TProcessor}} and {{TAsyncProcessor}} is:
{code:java}
public boolean process(...) throws TException;
{code}
It's not clear what the return value here because there is no documentation,
but parts of the code do not even bother checking the return value. All of the
returns, save one, are hard-coded to _true_. If there is a problem, code
should throw an Exception. Make this a void method.
Note: This the method signature in other languages is also a boolean.
was:
The method signature of {{TProcessor}} and {{TAsyncProcessor}} is:
{code:java}
public boolean process(...) throws TException;
{code}
It's not clear what the return value here because there is no documentation,
but parts of the code do not even bother checking the return value. If there
is a problem, code should throw an Exception. Make this a void method.
Note: This the method signature in other languages is also a boolean.
> Change Return Type Signature of Process Methods
> -----------------------------------------------
>
> Key: THRIFT-4725
> URL: https://issues.apache.org/jira/browse/THRIFT-4725
> Project: Thrift
> Issue Type: Improvement
> Components: Java - Library
> Affects Versions: 0.11.0
> Reporter: BELUGA BEHR
> Priority: Minor
> Fix For: 1.0
>
>
> The method signature of {{TProcessor}} and {{TAsyncProcessor}} is:
>
> {code:java}
> public boolean process(...) throws TException;
> {code}
> It's not clear what the return value here because there is no documentation,
> but parts of the code do not even bother checking the return value. All of
> the returns, save one, are hard-coded to _true_. If there is a problem, code
> should throw an Exception. Make this a void method.
> Note: This the method signature in other languages is also a boolean.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)