diff --git a/contrib/extraction/CHANGES.txt b/contrib/extraction/CHANGES.txt index 1609b2da955..d31fa2cffba 100644 --- a/contrib/extraction/CHANGES.txt +++ b/contrib/extraction/CHANGES.txt @@ -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) diff --git a/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java b/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java index 32cb7b3a13c..14cfc7efc14 100644 --- a/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java +++ b/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java @@ -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(); - while (configDateFormats.iterator().hasNext()) { - String format = (String) configDateFormats.iterator().next(); + Iterator it = configDateFormats.iterator(); + while (it.hasNext()) { + String format = (String) it.next().getValue(); log.info("Adding Date Format: " + format); dateFormats.add(format); }