lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r906556 - in /lucene/solr/trunk/contrib/extraction: CHANGES.txt src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
Date Thu, 04 Feb 2010 16:36:11 GMT
Author: markrmiller
Date: Thu Feb  4 16:36:11 2010
New Revision: 906556

URL: http://svn.apache.org/viewvc?rev=906556&view=rev
Log:
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.

Modified:
    lucene/solr/trunk/contrib/extraction/CHANGES.txt
    lucene/solr/trunk/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java

Modified: lucene/solr/trunk/contrib/extraction/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/extraction/CHANGES.txt?rev=906556&r1=906555&r2=906556&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/extraction/CHANGES.txt (original)
+++ lucene/solr/trunk/contrib/extraction/CHANGES.txt Thu Feb  4 16:36:11 2010
@@ -23,6 +23,9 @@
 
 * 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)

Modified: lucene/solr/trunk/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java?rev=906556&r1=906555&r2=906556&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
(original)
+++ lucene/solr/trunk/contrib/extraction/src/main/java/org/apache/solr/handler/extraction/ExtractingRequestHandler.java
Thu Feb  4 16:36:11 2010
@@ -35,6 +35,8 @@
 import java.io.File;
 import java.util.Collection;
 import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
 
 
 /**
@@ -81,8 +83,9 @@
       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);
         }



Mime
View raw message