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

Ted Yu commented on HBASE-18904:
--------------------------------

It is good practice to have the break statement.
If there is any unhandled return code by NEXT_ROW case, the control flow should 
go to this line at the end of method:
{code}
    throw new IllegalStateException(
        "Received code is not valid. rc: " + rc + ", localRC: " + localRC);
{code}
Currently control flow would go through SEEK_NEXT_USING_HINT case. This is 
undesirable - what if a new return code is added in the future ?

> Missing break in NEXT_ROW case of FilterList#mergeReturnCodeForOrOperator()
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-18904
>                 URL: https://issues.apache.org/jira/browse/HBASE-18904
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> Here is related code, around line 569:
> {code}
>       if (isInReturnCodes(rc, ReturnCode.NEXT_ROW)) {
>         return ReturnCode.NEXT_ROW;
>       }
>     case SEEK_NEXT_USING_HINT:
> {code}
> break was missing for the NEXT_ROW case.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to