You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2016/03/09 17:00:45 UTC

[34/50] [abbrv] lucene-solr git commit: SOLR-8766: Remove support for admin/gettableFiles as well

SOLR-8766: Remove support for admin/gettableFiles as well


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/dcb7a882
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/dcb7a882
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/dcb7a882

Branch: refs/heads/apiv2
Commit: dcb7a882b61d679ce220de8f40045ce8b0d8830b
Parents: 4cc9ad4
Author: Varun Thacker <va...@gmail.com>
Authored: Tue Mar 8 19:11:00 2016 +0530
Committer: Varun Thacker <va...@gmail.com>
Committed: Tue Mar 8 19:32:10 2016 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  3 +-
 .../src/java/org/apache/solr/core/SolrCore.java | 51 --------------------
 2 files changed, 2 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/dcb7a882/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 02021c5..ecf8b32 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -405,7 +405,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 <admin> tag in solrconfig.xml is removed (noble)
+* SOLR-8766: Remove deprecated <admin> tag in solrconfig.xml and support for admin/gettableFiles
+  (noble, Jason Gerlowski, Varun Thacker)
 
 ==================  5.5.1 ==================
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/dcb7a882/solr/core/src/java/org/apache/solr/core/SolrCore.java
----------------------------------------------------------------------
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 f4c40f8..cde878a 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
@@ -2270,54 +2267,6 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
   }
 
   /**
-   * 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 <admin/gettableFiles>, Please "+
-          "update your config to use the ShowFileRequestHandler." );
-      if( getRequestHandler( "/admin/file" ) == null ) {
-        NamedList<String> invariants = new NamedList<>();
-
-        // Hide everything...
-        Set<String> 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<Object> 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 <bool name='facet.sort'>. Please "+
-          "update your config to use <string name='facet.sort'>.");
-    }
-  }
-
-  /**
    * Creates and initializes a RestManager based on configuration args in solrconfig.xml.
    * RestManager provides basic storage support for managed resource data, such as to
    * persist stopwords to ZooKeeper if running in SolrCloud mode.