From 981ad999d075266423b01ece3be31ada3f89913b Mon Sep 17 00:00:00 2001 From: Varun Thacker Date: Tue, 8 Mar 2016 19:11:00 +0530 Subject: [PATCH] SOLR-8766: Remove support for admin/gettableFiles as well --- solr/CHANGES.txt | 3 +- .../java/org/apache/solr/core/SolrCore.java | 51 ------------------- 2 files changed, 2 insertions(+), 52 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index fa43ecec71c..a002efa8282 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -415,7 +415,8 @@ Other Changes * SOLR-8736: schema GET operations on fields, dynamicFields, fieldTypes, copyField are reimplemented as a part of the bulk API with less details (noble) -* SOLR-8766 : deprecated tag in solrconfig.xml is removed (noble) +* SOLR-8766: Remove deprecated tag in solrconfig.xml and support for admin/gettableFiles + (noble, Jason Gerlowski, Varun Thacker) ================== 5.5.1 ================== diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java index f4c40f842f7..cde878a5ebf 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java @@ -726,9 +726,6 @@ public final class SolrCore implements SolrInfoMBean, Closeable { reqHandlers = new RequestHandlers(this); reqHandlers.initHandlersFromConfig(solrConfig); - // Handle things that should eventually go away - initDeprecatedSupport(); - statsCache = initStatsCache(); // cause the executor to stall so firstSearcher events won't fire @@ -2269,54 +2266,6 @@ public final class SolrCore implements SolrInfoMBean, Closeable { return valueSourceParsers.get(parserName); } - /** - * Manage anything that should be taken care of in case configs change - */ - private void initDeprecatedSupport() - { - // TODO -- this should be removed in deprecation release... - String gettable = solrConfig.get("admin/gettableFiles", null ); - if( gettable != null ) { - log.warn( - "solrconfig.xml uses deprecated , Please "+ - "update your config to use the ShowFileRequestHandler." ); - if( getRequestHandler( "/admin/file" ) == null ) { - NamedList invariants = new NamedList<>(); - - // Hide everything... - Set hide = new HashSet<>(); - - for (String file : solrConfig.getResourceLoader().listConfigDir()) { - hide.add(file.toUpperCase(Locale.ROOT)); - } - - // except the "gettable" list - StringTokenizer st = new StringTokenizer( gettable ); - while( st.hasMoreTokens() ) { - hide.remove( st.nextToken().toUpperCase(Locale.ROOT) ); - } - for( String s : hide ) { - invariants.add( ShowFileRequestHandler.HIDDEN, s ); - } - - NamedList args = new NamedList<>(); - args.add( "invariants", invariants ); - ShowFileRequestHandler handler = new ShowFileRequestHandler(); - handler.init( args ); - reqHandlers.register("/admin/file", handler); - - log.warn( "adding ShowFileRequestHandler with hidden files: "+hide ); - } - } - - String facetSort = solrConfig.get("//bool[@name='facet.sort']", null); - if (facetSort != null) { - log.warn( - "solrconfig.xml uses deprecated . Please "+ - "update your config to use ."); - } - } - /** * Creates and initializes a RestManager based on configuration args in solrconfig.xml. * RestManager provides basic storage support for managed resource data, such as to