mirror of https://github.com/apache/lucene.git
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
This commit is contained in:
parent
b36efdb8c9
commit
1c4db9777a
|
@ -1395,7 +1395,7 @@ public final class SolrCore implements SolrInfoMBean {
|
||||||
log.warning(
|
log.warning(
|
||||||
"solrconfig.xml uses deprecated <admin/gettableFiles>, Please "+
|
"solrconfig.xml uses deprecated <admin/gettableFiles>, Please "+
|
||||||
"update your config to use the ShowFileRequestHandler." );
|
"update your config to use the ShowFileRequestHandler." );
|
||||||
if( getRequestHandler( "admin/file" ) == null ) {
|
if( getRequestHandler( "/admin/file" ) == null ) {
|
||||||
NamedList<String> invariants = new NamedList<String>();
|
NamedList<String> invariants = new NamedList<String>();
|
||||||
|
|
||||||
// Hide everything...
|
// Hide everything...
|
||||||
|
@ -1418,7 +1418,7 @@ public final class SolrCore implements SolrInfoMBean {
|
||||||
args.add( "invariants", invariants );
|
args.add( "invariants", invariants );
|
||||||
ShowFileRequestHandler handler = new ShowFileRequestHandler();
|
ShowFileRequestHandler handler = new ShowFileRequestHandler();
|
||||||
handler.init( args );
|
handler.init( args );
|
||||||
reqHandlers.register("admin/file", handler);
|
reqHandlers.register("/admin/file", handler);
|
||||||
|
|
||||||
log.warning( "adding ShowFileRequestHandler with hidden files: "+hide );
|
log.warning( "adding ShowFileRequestHandler with hidden files: "+hide );
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class TestConfig extends AbstractSolrTestCase {
|
||||||
public void testAutomaticDeprecationSupport()
|
public void testAutomaticDeprecationSupport()
|
||||||
{
|
{
|
||||||
// make sure the "admin/file" handler is registered
|
// 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 );
|
assertTrue( "file handler should have been automatically registered", handler!=null );
|
||||||
|
|
||||||
//System.out.println( handler.getHiddenFiles() );
|
//System.out.println( handler.getHiddenFiles() );
|
||||||
|
@ -76,4 +76,4 @@ public class TestConfig extends AbstractSolrTestCase {
|
||||||
assertFalse( handler.getHiddenFiles().contains( "scheam.xml".toUpperCase() ) );
|
assertFalse( handler.getHiddenFiles().contains( "scheam.xml".toUpperCase() ) );
|
||||||
assertTrue( handler.getHiddenFiles().contains( "PROTWORDS.TXT" ) );
|
assertTrue( handler.getHiddenFiles().contains( "PROTWORDS.TXT" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue