hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r579410 - in /lucene/hadoop/trunk/src/contrib/hbase: CHANGES.txt src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java
Date Tue, 25 Sep 2007 23:04:09 GMT
Author: stack
Date: Tue Sep 25 16:04:08 2007
New Revision: 579410

URL: http://svn.apache.org/viewvc?rev=579410&view=rev
Log:
HADOOP-1941 StopRowFilter throws NPE when passed null row

Modified:
    lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
    lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java
    lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java

Modified: lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt?rev=579410&r1=579409&r2=579410&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt (original)
+++ lucene/hadoop/trunk/src/contrib/hbase/CHANGES.txt Tue Sep 25 16:04:08 2007
@@ -61,6 +61,7 @@
     HADOOP-1923, HADOOP-1924 a) tests fail sporadically because set up and tear
                  down is inconsistent b) TestDFSAbort failed in nightly #242
     HADOOP-1929 Add hbase-default.xml to hbase jar
+    HADOOP-1941 StopRowFilter throws NPE when passed null row
 
   IMPROVEMENTS
     HADOOP-1737 Make HColumnDescriptor data publically members settable

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java?rev=579410&r1=579409&r2=579410&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/java/org/apache/hadoop/hbase/filter/StopRowFilter.java
Tue Sep 25 16:04:08 2007
@@ -98,6 +98,12 @@
 
   /** {@inheritDoc} */
   public boolean filter(final Text rowKey) {
+    if (rowKey == null) {
+      if (this.stopRowKey == null) {
+        return true;
+      }
+      return false;
+    }
     boolean result = this.stopRowKey.compareTo(rowKey) <= 0;
     if (LOG.isDebugEnabled()) {
       LOG.debug("Filter result for rowKey: " + rowKey + ".  Result: " + 

Modified: lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java?rev=579410&r1=579409&r2=579410&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java
(original)
+++ lucene/hadoop/trunk/src/contrib/hbase/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java
Tue Sep 25 16:04:08 2007
@@ -87,5 +87,7 @@
 
     assertFalse("FilterAllRemaining", filter.filterAllRemaining());
     assertFalse("FilterNotNull", filter.filterNotNull(null));
+    
+    assertFalse("Filter a null", filter.filter(null));
   }
 }



Mime
View raw message