lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r813353 - /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
Date Thu, 10 Sep 2009 10:22:22 GMT
Author: noble
Date: Thu Sep 10 10:22:21 2009
New Revision: 813353

URL: http://svn.apache.org/viewvc?rev=813353&view=rev
Log:
SOLR-1420 FieldreaderDataSource should throw an Exception if field has no data

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java?rev=813353&r1=813352&r2=813353&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/FieldReaderDataSource.java
Thu Sep 10 10:22:21 2009
@@ -62,7 +62,9 @@
 
   public Reader getData(String query) {
     Object o = vr.resolve(dataField);
-    if (o == null) return null;
+    if (o == null) {
+       throw new DataImportHandlerException (SEVERE, "No field available for name : " +dataField);
+    }
     if (o instanceof String) {
       return new StringReader((String) o);
     } else if (o instanceof Clob) {



Mime
View raw message