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/24 14:50:01 UTC
[jira] [Commented] (SOLR-12244) Inconsistent method names
[ https://issues.apache.org/jira/browse/SOLR-12244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16449991#comment-16449991 ]
KuiLIU commented on SOLR-12244:
-------------------------------
https://github.com/apache/lucene-solr/pull/354
> Inconsistent method names
> -------------------------
>
> 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
> Priority: Major
>
> 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