merge up to solr trunk rev 925091

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/newtrunk@925637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2010-03-20 17:18:22 +00:00
parent 958fd4be13
commit c3d33bc62e
4 changed files with 26 additions and 11 deletions

View File

@ -219,6 +219,9 @@ Bug Fixes
* SOLR-1798: Small memory leak (~100 bytes) in fastLRUCache for every
commit. (yonik)
* SOLR-1823: Fixed XMLResponseWriter (via XMLWriter) so it no longer throws
a ClassCastException when a Map containing a non-String key is used.
(Frank Wesemann, hossman)
Other Changes
----------------------

View File

@ -61,7 +61,9 @@ Bug Fixes
* SOLR-1766: DIH with threads enabled doesn't respond to the abort command (Michael Henson via noble)
* SOLR-1767: dataimporter.functions.escapeSql() does not escape backslash character (Sean Timm via noble)
* SOLR-1767: dataimporter.functions.escapeSql() does not escape backslash character (Sean Timm via noble)
* SOLR-1811: formatDate should use the current NOW value always (Sean Timm via noble)
Other Changes
----------------------

View File

@ -298,6 +298,11 @@ public class EvaluatorBag {
static Pattern IN_SINGLE_QUOTES = Pattern.compile("^'(.*?)'$");
static DateMathParser dateMathParser = new DateMathParser(TimeZone
.getDefault(), Locale.getDefault());
.getDefault(), Locale.getDefault()){
@Override
public Date getNow() {
return new Date();
}
};
}

View File

@ -631,20 +631,25 @@ final public class XMLWriter {
}
}
//A map is currently represented as a named list
public void writeMap(String name, Map val) throws IOException {
Map map = val;
/**
* writes a Map in the same format as a NamedList, using the
* stringification of the key Object when it's non-null.
*
* @param name
* @param map
* @throws IOException
* @see http://lucene.apache.org/solr/api/org/apache/solr/response/SolrQueryResponse.html#returnable_data
*/
public void writeMap(String name, Map<Object,Object> map) throws IOException {
int sz = map.size();
startTag("lst", name, sz<=0);
incLevel();
for (Map.Entry entry : (Set<Map.Entry>)map.entrySet()) {
// possible class-cast exception here...
String k = (String)entry.getKey();
for (Map.Entry<Object,Object> entry : map.entrySet()) {
Object k = entry.getKey();
Object v = entry.getValue();
// if (sz<indentThreshold) indent();
writeVal(k,v);
writeVal( null == k ? null : k.toString(), v);
}
decLevel();
if (sz > 0) {