From 1c4db9777ad81c9d4e90585096c7625e17061c9d Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Sat, 30 Aug 2008 00:05:12 +0000 Subject: [PATCH] SOLR-740: bugfix for legacy gettableFiles support added in SOLR-493 git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@690430 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/solr/core/SolrCore.java | 4 ++-- src/test/org/apache/solr/core/TestConfig.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/solr/core/SolrCore.java b/src/java/org/apache/solr/core/SolrCore.java index 76ab4edb692..2aa480768cc 100644 --- a/src/java/org/apache/solr/core/SolrCore.java +++ b/src/java/org/apache/solr/core/SolrCore.java @@ -1395,7 +1395,7 @@ public final class SolrCore implements SolrInfoMBean { log.warning( "solrconfig.xml uses deprecated , Please "+ "update your config to use the ShowFileRequestHandler." ); - if( getRequestHandler( "admin/file" ) == null ) { + if( getRequestHandler( "/admin/file" ) == null ) { NamedList invariants = new NamedList(); // Hide everything... @@ -1418,7 +1418,7 @@ public final class SolrCore implements SolrInfoMBean { args.add( "invariants", invariants ); ShowFileRequestHandler handler = new ShowFileRequestHandler(); handler.init( args ); - reqHandlers.register("admin/file", handler); + reqHandlers.register("/admin/file", handler); log.warning( "adding ShowFileRequestHandler with hidden files: "+hide ); } diff --git a/src/test/org/apache/solr/core/TestConfig.java b/src/test/org/apache/solr/core/TestConfig.java index a8e7b462766..c412363e9c9 100644 --- a/src/test/org/apache/solr/core/TestConfig.java +++ b/src/test/org/apache/solr/core/TestConfig.java @@ -68,7 +68,7 @@ public class TestConfig extends AbstractSolrTestCase { public void testAutomaticDeprecationSupport() { // make sure the "admin/file" handler is registered - ShowFileRequestHandler handler = (ShowFileRequestHandler) h.getCore().getRequestHandler( "admin/file" ); + ShowFileRequestHandler handler = (ShowFileRequestHandler) h.getCore().getRequestHandler( "/admin/file" ); assertTrue( "file handler should have been automatically registered", handler!=null ); //System.out.println( handler.getHiddenFiles() ); @@ -76,4 +76,4 @@ public class TestConfig extends AbstractSolrTestCase { assertFalse( handler.getHiddenFiles().contains( "scheam.xml".toUpperCase() ) ); assertTrue( handler.getHiddenFiles().contains( "PROTWORDS.TXT" ) ); } -} \ No newline at end of file +}