From 250924d72ed45ecb2cab50ffe9ee2d79f2d242ff Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Sun, 27 Sep 2009 21:03:02 +0000 Subject: [PATCH] SOLR-1468: allow null names in NamedList git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@819403 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ .../org/apache/solr/client/solrj/impl/XMLResponseParser.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 87717b9da95..ab95f395407 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -578,6 +578,9 @@ Bug Fixes 67. SOLR-1427: Fixed registry.jsp issue with MBeans (gsingers) +68. SOLR-1468: SolrJ's XML response parsing threw an exception for null + names, such as those produced when facet.missing=true (yonik) + Other Changes ---------------------- 1. Upgraded to Lucene 2.4.0 (yonik) diff --git a/src/solrj/org/apache/solr/client/solrj/impl/XMLResponseParser.java b/src/solrj/org/apache/solr/client/solrj/impl/XMLResponseParser.java index 318048f93d5..77b6210e75b 100644 --- a/src/solrj/org/apache/solr/client/solrj/impl/XMLResponseParser.java +++ b/src/solrj/org/apache/solr/client/solrj/impl/XMLResponseParser.java @@ -227,10 +227,12 @@ public class XMLResponseParser extends ResponseParser break; } } - + + /** The name in a NamedList can actually be null if( name == null ) { throw new XMLStreamException( "requires 'name' attribute: "+parser.getLocalName(), parser.getLocation() ); } + **/ if( !type.isLeaf ) { switch( type ) {