lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1629154 - in /lucene/dev/branches/branch_5x: ./ lucene/ lucene/core/ lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
Date Fri, 03 Oct 2014 09:07:10 GMT
Author: mikemccand
Date: Fri Oct  3 09:07:10 2014
New Revision: 1629154

URL: http://svn.apache.org/r1629154
Log:
do not accept null delegate in FilterLeafReader.Filter*

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/FilterLeafReader.java

Modified: lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java?rev=1629154&r1=1629153&r2=1629154&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
(original)
+++ lucene/dev/branches/branch_5x/lucene/core/src/java/org/apache/lucene/index/FilterLeafReader.java
Fri Oct  3 09:07:10 2014
@@ -65,6 +65,9 @@ public class FilterLeafReader extends Le
      * @param in the underlying Fields instance.
      */
     public FilterFields(Fields in) {
+      if (in == null) {
+        throw new NullPointerException("incoming Fields cannot be null");
+      }
       this.in = in;
     }
 
@@ -98,6 +101,9 @@ public class FilterLeafReader extends Le
      * @param in the underlying Terms instance.
      */
     public FilterTerms(Terms in) {
+      if (in == null) {
+        throw new NullPointerException("incoming Terms cannot be null");
+      }
       this.in = in;
     }
 
@@ -156,7 +162,12 @@ public class FilterLeafReader extends Le
      * Creates a new FilterTermsEnum
      * @param in the underlying TermsEnum instance.
      */
-    public FilterTermsEnum(TermsEnum in) { this.in = in; }
+    public FilterTermsEnum(TermsEnum in) {
+      if (in == null) {
+        throw new NullPointerException("incoming TermsEnum cannot be null");
+      }
+      this.in = in;
+    }
 
     @Override
     public AttributeSource attributes() {
@@ -219,6 +230,9 @@ public class FilterLeafReader extends Le
      * @param in the underlying DocsEnum instance.
      */
     public FilterDocsEnum(DocsEnum in) {
+      if (in == null) {
+        throw new NullPointerException("incoming DocsEnum cannot be null");
+      }
       this.in = in;
     }
 
@@ -263,6 +277,9 @@ public class FilterLeafReader extends Le
      * @param in the underlying DocsAndPositionsEnum instance.
      */
     public FilterDocsAndPositionsEnum(DocsAndPositionsEnum in) {
+      if (in == null) {
+        throw new NullPointerException("incoming DocsAndPositionsEnum cannot be null");
+      }
       this.in = in;
     }
 
@@ -327,6 +344,9 @@ public class FilterLeafReader extends Le
    */
   public FilterLeafReader(LeafReader in) {
     super();
+    if (in == null) {
+      throw new NullPointerException("incoming LeafReader cannot be null");
+    }
     this.in = in;
     in.registerParentReader(this);
   }



Mime
View raw message