You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "KuiLIU (JIRA)" <ji...@apache.org> on 2018/04/19 17:58:00 UTC

[jira] [Created] (SOLR-12244) Inconsistent method name

KuiLIU created SOLR-12244:
-----------------------------

             Summary: Inconsistent method name
                 Key: SOLR-12244
                 URL: https://issues.apache.org/jira/browse/SOLR-12244
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: KuiLIU


The following method is named as "getShardNames".
The methods is adding "sliceName" to "shardNames", thus the method name "addShardNames" should be more clear than "getShardNames" since "get" means getting something.
{code:java}
 public static void getShardNames(Integer numShards, List<String> shardNames) {
     if (numShards == null)
       throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "numShards" + " is a required param");
     for (int i = 0; i < numShards; i++) {
       final String sliceName = "shard" + (i + 1);
       shardNames.add(sliceName);
     }
 
   }
{code}




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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org