lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r1649996 - in /lucene/dev/trunk/solr/core/src: java/org/apache/solr/core/InitParams.java test/org/apache/solr/core/TestInitParams.java
Date Wed, 07 Jan 2015 06:10:49 GMT
Author: noble
Date: Wed Jan  7 06:10:49 2015
New Revision: 1649996

URL: http://svn.apache.org/r1649996
Log:
SOLR-6365 bug fix matching wrong  name when it is a shorter prefix of path

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/InitParams.java
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/TestInitParams.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/InitParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/InitParams.java?rev=1649996&r1=1649995&r2=1649996&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/InitParams.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/InitParams.java Wed Jan  7 06:10:49
2015
@@ -74,7 +74,7 @@ public class InitParams {
       if("**".equals(ps)) return true;
       return false;
     }
-    return true;
+    return false;
 
   }
 

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/TestInitParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/TestInitParams.java?rev=1649996&r1=1649995&r2=1649996&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/TestInitParams.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/core/TestInitParams.java Wed Jan 
7 06:10:49 2015
@@ -76,18 +76,7 @@ public class TestInitParams extends Solr
 
   }
 
-  /*@Test
-  public void testComponentWithInitParamAndRequestParam(){
-    for (String s : Arrays.asList("/dump4")) {
-      SolrRequestHandler handler = h.getCore().getRequestHandler(s);
-      SolrQueryResponse rsp = new SolrQueryResponse();
-      handler.handleRequest(req("param", "a","param","b" ,"param","c", "useParam","a"), rsp);
-      NamedList def = (NamedList) rsp.getValues().get("params");
-      assertEquals("A", def.get("a"));
-      assertEquals("B", def.get("b"));
-      assertEquals("C", def.get("c"));
-    }
-  }*/
+
   @Test
   public void testComponentWithConflictingInitParams(){
     SolrRequestHandler handler = h.getCore().getRequestHandler("/dump2");
@@ -119,7 +108,10 @@ public class TestInitParams extends Solr
 
   }
 
-
-
+  public void testMatchPath(){
+    InitParams initParams = new InitParams(new PluginInfo(InitParams.TYPE, ZkNodeProps.makeMap("path","/update/json/docs")));
+    assertFalse(initParams.matchPath("/update"));
+    assertTrue(initParams.matchPath("/update/json/docs"));
+  }
 
 }



Mime
View raw message