SOLR-3162: convert the URL to a String rather then using url.ToString()

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1298669 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2012-03-09 00:38:28 +00:00
parent f30f04a347
commit d17cfcff27
1 changed files with 13 additions and 1 deletions

View File

@ -25,6 +25,9 @@ import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SimpleOrderedMap;
import org.apache.solr.response.SolrQueryResponse;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
@ -85,7 +88,16 @@ public class SolrInfoMBeanHandler extends RequestHandlerBase {
mBeanInfo.add("description", m.getDescription());
mBeanInfo.add("srcId", m.getSourceId());
mBeanInfo.add("src", m.getSource());
mBeanInfo.add("docs", m.getDocs());
// Use an external form
URL[] urls = m.getDocs();
if(urls!=null) {
List<String> docs = new ArrayList<String>(urls.length);
for(URL url : urls) {
docs.add(url.toExternalForm());
}
mBeanInfo.add("docs", docs);
}
if (req.getParams().getFieldBool(key, "stats", false))
mBeanInfo.add("stats", m.getStatistics());