You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/04/19 16:16:00 UTC

[jira] [Commented] (KAFKA-6807) Inconsistent method name

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

ASF GitHub Bot commented on KAFKA-6807:
---------------------------------------

BruceKuiLiu opened a new pull request #4899: KAFKA-6807: Inconsistent method name.
URL: https://github.com/apache/kafka/pull/4899
 
 
   Change the method name "readTo" to "lesser".
   The method is named as "readTo", but the method will return the variable with lesses value. Thus, the name "readTo" is inconsistent with the method body code.
   Rename the method as "lesser" should be better.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Inconsistent method name
> ------------------------
>
>                 Key: KAFKA-6807
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6807
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: KuiLIU
>            Priority: Major
>
> The following method is named as "readTo", but the method will return the variable with lesses value. Thus, the name "readTo" is inconsistent with the method body code.
> Rename the method as "lesser" should be better.
> {code:java}
>     private Long readTo(final long endOffset) {
>         return endOffset < offsetLimit ? endOffset : offsetLimit;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)