lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1637542 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
Date Sat, 08 Nov 2014 11:19:18 GMT
Author: mikemccand
Date: Sat Nov  8 11:19:17 2014
New Revision: 1637542

URL: http://svn.apache.org/r1637542
Log:
LUCENE-6039: add another null check

Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/   (props changed)
    lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java?rev=1637542&r1=1637541&r2=1637542&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
Sat Nov  8 11:19:17 2014
@@ -140,6 +140,9 @@ public final class FieldInfo {
   }
 
   void setDocValuesType(DocValuesType type) {
+    if (type == null) {
+      throw new NullPointerException("DocValuesType cannot be null (field: \"" + name + "\")");
+    }
     if (docValuesType != DocValuesType.NONE && type != DocValuesType.NONE &&
docValuesType != type) {
       throw new IllegalArgumentException("cannot change DocValues type from " + docValuesType
+ " to " + type + " for field \"" + name + "\"");
     }



Mime
View raw message