Apache Lucene open-source search software
SOLR-1930: remove usage of getCore in admin
Yonik Seeleyf04e831982d5
diff --git a/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java b/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.javaindex 3e0d608936e..96c53ceea97 100644--- a/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java+++ b/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java@@ -200,12 +200,8 @@ public class ShowFileRequestHandler extends RequestHandlerBase** It is only used so that we can get rid of "/admin/get-file.jsp" and include* "admin-extra.html" in "/admin/index.html" using jsp scriptlets- *- * @deprecated This functionality is implemented in- * {@link #handleRequestBody(SolrQueryRequest, SolrQueryResponse)}.*/- @Deprecated- public static String getFileContents( String path )+ public static String getFileContents(SolrCore core, String path ){if( instance != null && instance.hiddenFiles != null ) {if( instance.hiddenFiles.contains( path ) ) {@@ -213,7 +209,6 @@ public class ShowFileRequestHandler extends RequestHandlerBase}}try {- SolrCore core = SolrCore.getSolrCore();InputStream input = core.getResourceLoader().openResource(path);return IOUtils.toString( input );}diff --git a/solr/src/webapp/web/admin/index.jsp b/solr/src/webapp/web/admin/index.jspindex 1cfe96659a7..b38c6884b82 100644--- a/solr/src/webapp/web/admin/index.jsp+++ b/solr/src/webapp/web/admin/index.jsp@@ -97,7 +97,7 @@<%// a quick hack to get rid of get-file.jsp -- note this still spits out invalid HTML- out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents( "admin-extra.html" ) );+ out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents(core, "admin-extra.html" ) );%></table><P>