lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tommaso Teofili (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-3396) ClientUtils appendMap can suffer NPE
Date Mon, 23 Apr 2012 07:26:46 GMT

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

Tommaso Teofili updated SOLR-3396:
----------------------------------

    Affects Version/s:     (was: 3.6)
                       4.0
    
> ClientUtils appendMap can suffer NPE
> ------------------------------------
>
>                 Key: SOLR-3396
>                 URL: https://issues.apache.org/jira/browse/SOLR-3396
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 4.0
>            Reporter: Tommaso Teofili
>            Priority: Minor
>
> SolrJ's ClientUtils.appendMap method can suffer NPE if either map1 or map2 are null:
> {code}
>   public static void appendMap(String collection, Map<String,Slice> map1, Map<String,Slice>
map2) {
>       Set<Entry<String,Slice>> entrySet = map2.entrySet(); // NPE on map2
>       for (Entry<String,Slice> entry : entrySet) {
>         map1.put(collection + "_" + entry.getKey(), entry.getValue()); // NPE on map1
>       }
>   }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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


Mime
View raw message