You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2013/06/13 19:51:20 UTC

[jira] [Commented] (SOLR-4925) Collection create throws NPE when 'numShards' param is missing

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

Uwe Schindler commented on SOLR-4925:
-------------------------------------

The code must be:

{code:java}
static Integer msgToStr(String val,Integer def ){
  return  val == null ? def : Integer.valueOf(val);
}
{code}

Then it passes. It also saves boxing/unboxing multiple times.
                
> Collection create throws NPE when 'numShards' param is missing
> --------------------------------------------------------------
>
>                 Key: SOLR-4925
>                 URL: https://issues.apache.org/jira/browse/SOLR-4925
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>            Priority: Trivial
>             Fix For: 4.4
>
>         Attachments: SOLR-4925.patch
>
>
> OverseerCollectionProcessor.msgStrToInt(ZkNodeProps message, String key, Integer def) throws NPE when the key value is null. I is expected to return the value of 'def' 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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