lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1209639 - /lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextStoredFieldsWriter.java
Date Fri, 02 Dec 2011 19:01:17 GMT
Author: rmuir
Date: Fri Dec  2 19:01:17 2011
New Revision: 1209639

URL: http://svn.apache.org/viewvc?rev=1209639&view=rev
Log:
LUCENE-3616: add this sanity check to SimpleText too

Modified:
    lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextStoredFieldsWriter.java

Modified: lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextStoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextStoredFieldsWriter.java?rev=1209639&r1=1209638&r2=1209639&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextStoredFieldsWriter.java
(original)
+++ lucene/dev/trunk/lucene/src/java/org/apache/lucene/index/codecs/simpletext/SimpleTextStoredFieldsWriter.java
Fri Dec  2 19:01:17 2011
@@ -148,6 +148,8 @@ public class SimpleTextStoredFieldsWrite
         write(VALUE);
         write(bytes);
         newLine();
+      } else if (field.stringValue() == null) {
+        throw new IllegalArgumentException("field " + field.name() + " is stored but does
not have binaryValue, stringValue nor numericValue");
       } else {
         write(TYPE_STRING);
         newLine();



Mime
View raw message