SOLR-1930: remove usage of getCore in admin

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1054008 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-12-30 22:10:49 +00:00
parent 609a5f2094
commit f04e831982
2 changed files with 2 additions and 7 deletions

View File

@ -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 );
}

View File

@ -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>