Given this is a bool in other languages, they were probably copied from
this implementation.
Someone may have their own processor based on this which relies on this
behavior, so as a breaking change it needs to be documented in
lib/java/README.md and in /CHANGES at the very least, and the Jira ticket
needs a "Breaking-Change" label.

This particular change doesn't buy us much, I'm not certain it's really
worth it in the end.
I prefer exceptions over return value checking, and it's poorly
documented... hrm..

On Sun, Jan 6, 2019 at 3:07 PM BELUGA BEHR (JIRA) <[email protected]> wrote:

>
>      [
> 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)
>

Reply via email to