From e706c72b557175047673cb1e870519450c0745f2 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Tue, 4 Dec 2007 22:09:41 +0000 Subject: [PATCH] do put+get in one operation git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@601106 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/solr/common/params/ModifiableSolrParams.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/java/org/apache/solr/common/params/ModifiableSolrParams.java b/src/java/org/apache/solr/common/params/ModifiableSolrParams.java index 9f4bccf0fa5..a679138962b 100644 --- a/src/java/org/apache/solr/common/params/ModifiableSolrParams.java +++ b/src/java/org/apache/solr/common/params/ModifiableSolrParams.java @@ -73,7 +73,7 @@ public class ModifiableSolrParams extends SolrParams * Add the given values to any existing name */ public void add( String name, String ... val ) { - String[] old = vals.get( name ); + String[] old = vals.put(name, val); if( old != null ) { int i =0; if( val == null || val.length < 1 ) { @@ -95,9 +95,6 @@ public class ModifiableSolrParams extends SolrParams vals.put( name, both ); } } - else { - vals.put( name, val ); - } } /**