mirror of https://github.com/apache/lucene.git
SOLR-1756: The date.format setting causes ClassCastException when enabled and the config code that parses this setting does not properly use the same iterator instance.
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@906556 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9dc5d7edda
commit
8d22659b57
|
@ -23,6 +23,9 @@ $Id:$
|
|||
|
||||
* SOLR-1567: Upgrade to Tika 0.5, which upgrades many of the underlying libraries (PDFBox, for example) too (gsingers)
|
||||
|
||||
* SOLR-1756: The date.format setting causes ClassCastException when enabled and the config code that
|
||||
parses this setting does not properly use the same iterator instance. (Christoph Brill, Mark Miller)
|
||||
|
||||
================== Release 1.4.0 ==================
|
||||
|
||||
1. SOLR-284: Added in support for extraction. (Eric Pugh, Chris Harris, gsingers)
|
||||
|
|
|
@ -35,6 +35,8 @@ import org.slf4j.LoggerFactory;
|
|||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -81,8 +83,9 @@ public class ExtractingRequestHandler extends ContentStreamHandlerBase implement
|
|||
NamedList configDateFormats = (NamedList) initArgs.get(DATE_FORMATS);
|
||||
if (configDateFormats != null && configDateFormats.size() > 0) {
|
||||
dateFormats = new HashSet<String>();
|
||||
while (configDateFormats.iterator().hasNext()) {
|
||||
String format = (String) configDateFormats.iterator().next();
|
||||
Iterator<Map.Entry> it = configDateFormats.iterator();
|
||||
while (it.hasNext()) {
|
||||
String format = (String) it.next().getValue();
|
||||
log.info("Adding Date Format: " + format);
|
||||
dateFormats.add(format);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue