Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Fix admin path for single cores (the core name is not null, it is an empty string)

Shalin Shekhar Mangar5eb8861bb4f1
diff --git a/src/webapp/web/index.jsp b/src/webapp/web/index.jsp
index 66ec69e61d4..8b4043b0c5f 100644
--- a/src/webapp/web/index.jsp
+++ b/src/webapp/web/index.jsp
@@ -31,7 +31,7 @@
org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
if( cores != null
&& cores.getCores().size() > 0 // HACK! check that we have valid names...
- && cores.getCores().iterator().next().getName() != null ) {
+ && cores.getCores().iterator().next().getName().length() != 0 ) {
for( org.apache.solr.core.SolrCore core : cores.getCores() ) {%>
<a href="<%= core.getName() %>/admin/">Admin <%= core.getName() %></a><br/>
<% }} else { %>