[jira] [Commented] (SOLR-12244) Inconsistent method names

2018-04-24 Thread KuiLIU (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-12244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-12244) Inconsistent method names

2018-04-19 Thread KuiLIU (JIRA)

 [ 
https://issues.apache.org/jira/browse/SOLR-12244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

KuiLIU updated SOLR-12244:
--
Summary: Inconsistent method names  (was: Inconsistent method name)

> 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 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



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

2018-04-19 Thread KuiLIU (JIRA)
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 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org