lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r1724699 - in /lucene/dev/trunk/solr/core/src: java/org/apache/solr/search/QueryParsing.java test/org/apache/solr/search/QueryParsingTest.java
Date Thu, 14 Jan 2016 21:31:52 GMT
Author: hossman
Date: Thu Jan 14 21:31:52 2016
New Revision: 1724699

URL: http://svn.apache.org/viewvc?rev=1724699&view=rev
Log:
SOLR-2798: remove deprecated methods from trunk

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/QueryParsing.java
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/QueryParsing.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/QueryParsing.java?rev=1724699&r1=1724698&r2=1724699&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/QueryParsing.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/QueryParsing.java Thu Jan 14
21:31:52 2016
@@ -91,40 +91,6 @@ public class QueryParsing {
    * @param start Index into text for start of parsing
    * @param target Object to inject with parsed settings
    * @param params Additional existing parameters
-   * @deprecated use {@link #parseLocalParams(String, int, ModifiableSolrParams, SolrParams)}
instead
-   */
-  @Deprecated
-  public static int parseLocalParams(String txt, int start, Map<String, String> target,
SolrParams params) throws SyntaxError {
-    return parseLocalParams(txt, start, target, params, LOCALPARAM_START, LOCALPARAM_END);
-  }
-
-  /**
-   * @param txt Text to parse
-   * @param start Index into text for start of parsing
-   * @param target Object to inject with parsed settings
-   * @param params Additional existing parameters
-   * @param startString String that indicates the start of a localParams section
-   * @param endChar Character that indicates the end of a localParams section
-   * @deprecated use {@link #parseLocalParams(String, int, ModifiableSolrParams, SolrParams,
String, char)} instead
-   */
-  @Deprecated
-  public static int parseLocalParams(String txt, int start, Map<String, String> target,
SolrParams params, String startString, char endChar) throws SyntaxError {
-    ModifiableSolrParams newTarget = new ModifiableSolrParams();
-    int retVal = parseLocalParams(txt, start, newTarget, params, startString, endChar);
-    // Translate ModifiableSolrParams to Map<String, String>, implementing "last value
wins" for multi-valued params for backward compatibility
-    for (String param : newTarget.getParameterNames()) {
-      for (String value : newTarget.getParams(param)) {
-        target.put(param, value);
-      }
-    }
-    return retVal;
-  }
-
-  /**
-   * @param txt Text to parse
-   * @param start Index into text for start of parsing
-   * @param target Object to inject with parsed settings
-   * @param params Additional existing parameters
    */
   public static int parseLocalParams(String txt, int start, ModifiableSolrParams target,
SolrParams params) throws SyntaxError {
     return parseLocalParams(txt, start, target, params, LOCALPARAM_START, LOCALPARAM_END);

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java?rev=1724699&r1=1724698&r2=1724699&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/search/QueryParsingTest.java Thu Jan
14 21:31:52 2016
@@ -74,14 +74,6 @@ public class QueryParsingTest extends So
     }
   }
   
-  public void testLocalParamsWithLinkedHashMap() throws Exception {
-    LinkedHashMap<String, String> target = new LinkedHashMap<String, String>();
-    QueryParsing.parseLocalParams("{!handler foo1=bar1 foo2=bar2 multi=loser multi=winner}",
0, target, new ModifiableSolrParams(), "{!", '}');
-    assertEquals("bar1", target.get("foo1"));
-    assertEquals("bar2", target.get("foo2"));
-    assertEquals("winner", target.get("multi"));
-  }
-
   public void testLocalParamsWithModifiableSolrParams() throws Exception {
     ModifiableSolrParams target = new ModifiableSolrParams();
     QueryParsing.parseLocalParams("{!handler foo1=bar1 foo2=bar2 multi=loser multi=winner}",
0, target, new ModifiableSolrParams(), "{!", '}');



Mime
View raw message